:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #60646c;
  --line: #d8dadd;
  --surface: #ffffff;
  --canvas: #f5f4ef;
  --green: #1f6f4a;
  --green-dark: #164e36;
  --gold: #b8791f;
  --red: #b23a32;
  --blue: #275f8f;
  --shadow: 0 18px 50px rgba(28, 30, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(31, 111, 74, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(32, 33, 36, 0.05) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  min-height: 0;
  padding: 28px;
  color: #f9fbf8;
  background: #173d2d;
  /* Account panel sits at the bottom; allow scroll so it is never clipped */
  overflow-x: hidden;
  overflow-y: auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-tagline {
  margin: 0.25rem 0 0;
  color: var(--muted, #6b7280);
  font-size: 0.85rem;
}

.account-panel {
  flex-shrink: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.25rem;
  border-top: 1px solid rgba(249, 251, 248, 0.12);
}

.sidebar .stats-panel {
  margin-top: auto;
  flex-shrink: 0;
}

.account-panel .eyebrow {
  margin-bottom: 0.5rem;
}

.account-status,
.account-user,
.account-meta,
.account-migrate,
.account-footnote,
.account-config-hint {
  margin: 0 0 0.5rem;
  color: rgba(249, 251, 248, 0.78);
  font-size: 0.78rem;
  line-height: 1.4;
}

.account-user {
  color: #efc36b;
  font-weight: 600;
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.account-button {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.5rem 0.65rem;
}

.sidebar .account-button.secondary-button {
  background: rgba(249, 251, 248, 0.08);
  color: #f9fbf8;
  border: 1px solid rgba(249, 251, 248, 0.2);
}

.sidebar .account-button.secondary-button:hover {
  background: rgba(249, 251, 248, 0.14);
}

.account-footnote {
  margin-top: 0.35rem;
}

.account-config-hint code {
  font-size: 0.72rem;
  color: #efc36b;
}

.text-button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #efc36b;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.sidebar .eyebrow {
  color: #efc36b;
}

/* Brand lockup — keep "Stuffminder" inside the 280px rail */
.sidebar > div:first-child {
  min-width: 0;
}

.sidebar h1 {
  max-width: none;
  width: 100%;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h2 {
  max-width: 820px;
  font-size: clamp(1.65rem, 3vw, 2.75rem);
}

h3 {
  font-size: 1.15rem;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  color: rgba(255, 255, 255, 0.74);
  padding: 10px 12px;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-list a.active,
.nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: #efc36b;
}

.stats-panel {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.stats-panel div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stats-panel span {
  font-size: 2rem;
  font-weight: 800;
}

.stats-panel small {
  color: rgba(255, 255, 255, 0.68);
}

.workspace {
  display: grid;
  gap: 22px;
  padding: 26px;
}

.topbar,
.panel-heading,
.button-row,
.queue-actions,
.top-actions,
.intake-status,
.draft-meta,
.photo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.queue-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.device-strip,
.pricing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.device-strip article,
.pricing-strip article {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.device-strip strong {
  color: var(--green-dark);
}

.device-strip span,
.pricing-strip span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.pricing-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-strip article:first-child {
  border-color: #bcd9c2;
  background: #f4fbf5;
}

.pricing-strip article:last-child {
  border-color: #dfc68f;
  background: #fffaf0;
}

.mentor-panel {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(39, 95, 143, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.dashboard-grid article,
.dashboard-card {
  display: grid;
  font: inherit;
  text-align: left;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  color: inherit;
  background: #f9faf7;
  border: 1px solid #e1e4df;
  border-radius: 8px;
  cursor: pointer;
}

.dashboard-card:hover,
.dashboard-card:focus-visible {
  border-color: #b8cdbb;
  box-shadow: 0 10px 22px rgba(46, 74, 56, 0.12);
  outline: 0;
}

.dashboard-grid span,
.dashboard-card span {
  color: var(--green-dark);
  font-size: clamp(1.45rem, 1.7vw, 2rem);
  font-weight: 900;
}

.dashboard-grid small,
.next-action span,
.filter-summary {
  color: var(--muted);
  line-height: 1.4;
}

.next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px;
  background: #fffaf0;
  border: 1px solid #dfc68f;
  border-radius: 8px;
}

.next-action div {
  display: grid;
  gap: 5px;
}

.mvp-path {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mvp-path a {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 86px;
  padding: 12px;
  color: var(--ink);
  background: #f7f8f5;
  border: 1px solid #e0e5dc;
  border-radius: 8px;
}

.mvp-path a:hover {
  border-color: #b8cdbb;
}

.mvp-path span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--green-dark);
  background: #e8f2ea;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
}

.mvp-path .complete span {
  color: #fff;
  background: var(--green);
}

.mvp-path strong {
  color: var(--green-dark);
}

.mvp-path small {
  color: var(--muted);
  line-height: 1.3;
}

.dashboard-signals {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dashboard-signals article,
.dashboard-card.compact {
  display: grid;
  font: inherit;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  text-align: left;
  color: inherit;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #e2e6df;
  border-radius: 8px;
}

.dashboard-signals span,
.dashboard-card.compact span {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.1;
}

.dashboard-signals strong,
.dashboard-card.compact strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.primary-link {
  color: #fff;
  background: var(--green);
}

.secondary-link {
  color: var(--green-dark);
  background: #edf5ef;
  border: 1px solid #c8dccc;
}

.mentor-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mentor-steps article {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 150px;
  padding: 14px;
  background: #fff;
  border: 1px solid #dfe4e7;
  border-radius: 8px;
}

.mentor-steps span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
}

.mentor-steps strong {
  color: var(--green-dark);
}

.mentor-steps small {
  color: var(--muted);
  line-height: 1.4;
}

.signal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.signal-panel {
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.alert-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.alert-settings label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.alert-settings input {
  width: 100%;
  min-height: 38px;
  padding: 8px;
  border: 1px solid #cfd7cf;
  border-radius: 6px;
  font: inherit;
}

.alert-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.alert-hidden-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.alert-hidden-summary.has-hidden {
  color: #173d2d;
  font-weight: 800;
}

.alert-list > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f9faf7;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
}

.alert-list .risk {
  border-left-color: #c2410c;
}

.alert-list .warning {
  border-left-color: var(--gold);
}

.alert-list .neutral,
.alert-list .alert-empty {
  border-left-color: #6b7280;
}

.alert-list strong {
  color: var(--green-dark);
}

.alert-list span {
  color: var(--muted);
  line-height: 1.4;
}

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

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

.swimlane-list span {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px;
  color: var(--green-dark);
  background: #edf5ef;
  border: 1px solid #c8dccc;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.acquisition-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.readiness-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.readiness-flow article {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  background: #f9faf7;
  border: 1px solid #e1e4df;
  border-radius: 8px;
}

.readiness-flow strong {
  color: var(--green-dark);
}

.readiness-flow span {
  color: var(--muted);
  line-height: 1.4;
}

.readiness-queue {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.readiness-queue-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  padding: 12px;
  background: #f7f8f5;
  border: 1px solid #e1e5de;
  border-radius: 8px;
}

.readiness-queue-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-height: 92px;
}

.readiness-queue-heading div {
  display: grid;
  gap: 5px;
}

.readiness-queue-heading strong {
  color: var(--green-dark);
}

.readiness-queue-heading span,
.readiness-queue-empty,
.readiness-queue-item span,
.readiness-queue-item small,
.readiness-queue-list > small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.readiness-queue-heading b {
  min-width: 30px;
  padding: 5px 7px;
  color: var(--green-dark);
  background: #e7f1e9;
  border-radius: 6px;
  text-align: center;
}

.readiness-queue-list {
  display: grid;
  gap: 9px;
}

.readiness-queue-item {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: #fff;
  border: 1px solid #e5e7e1;
  border-radius: 7px;
}

.readiness-queue-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
}

.readiness-queue-item span,
.readiness-queue-item small {
  display: block;
}

.readiness-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.readiness-queue-empty {
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px dashed #d9ddd5;
  border-radius: 7px;
}

.workflow-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.workflow-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 12px;
  background: #f7f8f5;
  border: 1px solid #e1e5de;
  border-radius: 8px;
}

.workflow-column-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
}

.workflow-column-heading div {
  display: grid;
  gap: 5px;
}

.workflow-column-heading strong {
  color: var(--green-dark);
}

.workflow-column-heading span,
.workflow-empty,
.workflow-card span,
.workflow-card small,
.workflow-card-list > small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.workflow-column-heading b {
  min-width: 30px;
  padding: 5px 7px;
  color: var(--green-dark);
  background: #e7f1e9;
  border-radius: 6px;
  text-align: center;
}

.workflow-card-list {
  display: grid;
  gap: 9px;
}

.workflow-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: #fff;
  border: 1px solid #e5e7e1;
  border-radius: 7px;
}

.workflow-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
}

.workflow-card-meta,
.workflow-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.workflow-card-meta {
  flex-wrap: wrap;
}

.workflow-card-footer select {
  max-width: 118px;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.workflow-empty {
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px dashed #d9ddd5;
  border-radius: 7px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.detail-actions .small-button {
  min-height: 40px;
}

.item-detail-empty {
  margin-top: 16px;
  padding: 18px;
  color: var(--muted);
  background: #f8f9f6;
  border: 1px dashed #d9ddd5;
  border-radius: 8px;
  line-height: 1.45;
}

.item-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 14px;
  margin-top: 16px;
}

.detail-summary,
.detail-card {
  padding: 16px;
  background: #fff;
  border: 1px solid #e4e7e0;
  border-radius: 8px;
}

.detail-summary {
  display: grid;
  gap: 14px;
  grid-row: span 4;
}

.detail-summary h4 {
  margin: 2px 0 0;
  font-size: 1.15rem;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-facts div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  background: #f8f9f6;
  border: 1px solid #e5e8e1;
  border-radius: 7px;
}

.detail-facts span,
.detail-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.detail-facts strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.detail-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.detail-card > strong {
  color: var(--green-dark);
}

.detail-notes {
  grid-column: 2;
}

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

.audit-trail div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: #f8f9f6;
  border: 1px solid #e5e8e1;
  border-radius: 7px;
}

.audit-trail span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.acquisition-flow article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  background: #f9faf7;
  border: 1px solid #e1e4df;
  border-radius: 8px;
}

.acquisition-flow strong {
  color: var(--green-dark);
}

.acquisition-flow span,
.acquisition-flow small,
.archive-note span {
  color: var(--muted);
  line-height: 1.4;
}

.archive-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 14px;
  background: #fffaf0;
  border: 1px solid #dfc68f;
  border-radius: 8px;
}

.panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.compact-grid {
  margin: 0;
}

.category-details,
.attachment-fieldset,
.checklist-fieldset,
.client-fieldset,
.comp-fieldset,
.sale-fieldset,
.intake-fieldset,
.notes-fieldset {
  margin: 18px 0 14px;
  padding: 16px;
  border: 1px solid #dfe4e7;
  border-radius: 8px;
  background: #fbfcfa;
}

.category-details legend,
.attachment-fieldset legend,
.checklist-fieldset legend,
.client-fieldset legend,
.comp-fieldset legend,
.sale-fieldset legend,
.intake-fieldset legend,
.notes-fieldset legend {
  padding: 0 7px;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

/* Full-width note fields under a 2-col grid — need clear separation from fields above */
.full-width-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  grid-column: 1 / -1;
}

.comp-fieldset .full-width-field,
.notes-fieldset .full-width-field,
.attachment-fieldset .full-width-field,
.sale-fieldset .full-width-field,
.client-fieldset .full-width-field {
  margin-top: 16px;
}

.notes-fieldset .full-width-field + .full-width-field {
  margin-top: 14px;
}

.comp-fieldset .field-help,
.notes-fieldset .field-help {
  margin-top: 12px;
}

/* Capture Once: keep title on one line; status pills wrap under if needed */
.intake-heading {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.intake-title-block {
  min-width: min(100%, 12rem);
  flex: 1 1 14rem;
}

.intake-title {
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.intake-lede {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 36rem;
}

.intake-status {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.intake-fieldset .form-grid {
  margin-top: 0;
}

.intake-fieldset .platform-plan-help {
  margin-top: 10px;
  grid-column: 1 / -1;
}

.field-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.checklist-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #e1e5df;
  border-radius: 7px;
  font-weight: 800;
}

.checklist-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9ccd1;
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
}

select,
input {
  min-height: 44px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 111, 74, 0.14);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.status-pill {
  padding: 8px 10px;
  color: #6d531d;
  background: #fff7df;
  border: 1px solid #ead28d;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.good {
  color: var(--green-dark);
  background: #eaf5ec;
  border-color: #bcd9c2;
}

.status-pill.risk {
  color: #8d2d26;
  background: #fff0ee;
  border-color: #e5b9b4;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 286px;
  padding: 3px;
  background: #eef0ed;
  border: 1px solid #d6d9d5;
  border-radius: 7px;
}

.segmented button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-weight: 800;
}

.segmented button.active {
  color: #fff;
  background: var(--green);
}

.primary-button,
.secondary-button,
.danger-button,
.file-button,
.icon-button {
  box-sizing: border-box;
  min-height: 40px;
  height: 40px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}

.primary-button {
  color: #fff;
  background: var(--green);
  padding: 0 16px;
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary-button {
  color: var(--green-dark);
  background: #edf5ef;
  border-color: #c8dccc;
  padding: 0 14px;
}

.file-input-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  vertical-align: middle;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  background: #edf5ef;
  border-color: #c8dccc;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

.file-button:hover {
  background: #e3efe7;
}

#backupFile {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
  pointer-events: none;
}

.danger-button {
  color: #fff;
  background: var(--red);
  padding: 0 14px;
}

.small-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--green-dark);
  background: #f2f7f3;
  border: 1px solid #cdded0;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
}

.small-button.danger-text {
  color: #8d2d26;
  background: #fff4f2;
  border-color: #e4c2bd;
}

.icon-button {
  width: 42px;
  color: var(--green-dark);
  background: #fff;
  border-color: var(--line);
  font-size: 1.2rem;
}

.photo-strip {
  margin-top: 16px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(39, 95, 143, 0.11), transparent 44%),
    #f7f9fb;
  border: 1px dashed #b7c5d1;
  border-radius: 8px;
}

.platform-plan-help {
  align-self: end;
  padding: 10px 12px;
  color: var(--muted);
  background: #f7f8f5;
  border: 1px solid #e1e5de;
  border-radius: 6px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.bulk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin-top: 16px;
  align-items: stretch;
}

.bulk-format-guide {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  color: #173d2d;
  background: #fbfaf4;
  border: 1px solid #e2d6b7;
  border-radius: 8px;
}

.bulk-format-guide span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.bulk-format-guide code {
  display: block;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: #173d2d;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

.bulk-examples {
  display: grid;
  gap: 8px;
}

.insight-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  color: #173d2d;
  background:
    linear-gradient(135deg, rgba(184, 121, 31, 0.16), transparent 48%),
    #fbfaf4;
  border: 1px solid #e2d6b7;
  border-radius: 8px;
}

.insight-panel span {
  color: var(--muted);
  line-height: 1.45;
}

.photo-strip div {
  display: grid;
  gap: 3px;
}

.photo-strip span,
.draft-meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.listing-copy-help {
  margin: 0 0 10px;
  grid-column: 1 / -1;
}

.posting-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.fast-list-panel {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #c8dccc;
  border-radius: 10px;
  background: linear-gradient(180deg, #f3faf5 0%, #eef6f0 100%);
}

.fast-list-panel[hidden] {
  display: none !important;
}

.fast-list-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.fast-list-heading h4 {
  margin: 0;
  font-size: 1.05rem;
}

.fast-list-coach {
  margin: 0 0 12px;
  color: #173d2d;
  font-size: 0.92rem;
  line-height: 1.45;
}

.fast-list-steps {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  display: grid;
  gap: 6px;
  color: #2a4034;
  font-size: 0.9rem;
  line-height: 1.35;
}

.fast-list-steps li[data-state="done"] {
  color: #4a6b58;
  text-decoration: line-through;
  opacity: 0.85;
}

.fast-list-steps li[data-state="current"] {
  font-weight: 800;
  color: #0f3d28;
}

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

.draft-box {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.platform-plan-summary {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--muted);
  background: #f7f8f5;
  border: 1px solid #e1e5de;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.platform-plan-summary.has-plan {
  color: #173d2d;
  background: #edf5ef;
  border-color: #c8dccc;
  font-weight: 800;
}

.media-readiness,
.marketplace-readiness {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.media-readiness {
  grid-template-columns: minmax(0, 1fr);
}

.marketplace-readiness {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-readiness article,
.marketplace-readiness article,
.marketplace-card,
.media-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  padding: 12px;
  background: #f8f9f6;
  border: 1px solid #e1e5df;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.marketplace-platform-name {
  display: block;
  min-width: 0;
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Full-width status line under platform name — never squeezes the title */
.readiness-banner {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.readiness-banner.needs {
  color: #8d2d26;
  background: #fff0ee;
  border-color: #f0c9c4;
}

.readiness-banner.almost,
.readiness-banner.warning {
  color: #6d531d;
  background: #fff4d3;
  border-color: #ead7a0;
}

.readiness-banner.ready {
  color: var(--green-dark);
  background: #e7f4e9;
  border-color: #c7dfcb;
}

.readiness-banner.ready.subtle {
  font-weight: 800;
  opacity: 0.95;
}

.readiness-banner.neutral {
  color: #4e5963;
  background: #eef1f3;
  border-color: #d5d9de;
}

.media-readiness article,
.media-card {
  min-height: auto;
}

.media-readiness-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.media-readiness-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.media-readiness-list span {
  padding: 5px 8px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid #e1e5df;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.media-readiness-list span.done {
  color: var(--green-dark);
  background: #e7f4e9;
  border-color: #c7dfcb;
}

.media-readiness p,
.media-readiness small,
.marketplace-readiness p,
.marketplace-readiness small {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.media-readiness strong,
.marketplace-readiness strong {
  color: var(--green-dark);
}

.draft-meta {
  align-items: stretch;
}

.draft-meta span {
  flex: 1;
  padding: 10px;
  background: #f6f6f2;
  border: 1px solid #e1e1dc;
  border-radius: 6px;
  text-align: center;
}

.button-row {
  justify-content: flex-end;
  margin-top: 18px;
}

.inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.table-density.segmented {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.table-density button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.table-density button.active {
  background: var(--green);
  color: #fff;
}

.inventory-table-hint {
  margin: 8px 0 0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

/* Essential = fit viewport; Full may scroll */
.inventory-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.inventory-table.density-full {
  table-layout: auto;
  min-width: 1080px;
}

.inventory-table th,
.inventory-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8e9e4;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f5f1;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.inventory-table .col-item {
  width: 32%;
}

.inventory-table.density-essential .col-ready {
  width: 12%;
}

.inventory-table.density-essential .col-price {
  width: 10%;
}

.inventory-table.density-essential .col-place {
  width: 14%;
}

.inventory-table.density-essential .col-post {
  width: 12%;
}

.inventory-table.density-essential .col-status {
  width: 12%;
}

.inventory-table .col-actions {
  width: 140px;
}

.inventory-table .col-item,
.inventory-table .col-actions {
  position: sticky;
  background: #fff;
}

.inventory-table thead .col-item,
.inventory-table thead .col-actions {
  background: #f4f5f1;
}

.inventory-table .col-item {
  left: 0;
  z-index: 1;
  box-shadow: 4px 0 8px -6px rgba(0, 0, 0, 0.18);
}

.inventory-table .col-actions {
  right: 0;
  z-index: 1;
  box-shadow: -4px 0 8px -6px rgba(0, 0, 0, 0.18);
}

.inventory-table .item-name {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-table .item-meta,
.inventory-table .place-cell {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.posting-status-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.post-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f0f2ec;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.post-chip b {
  color: var(--green);
}

.inventory-table .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.inventory-table .row-actions .small-button {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: #f7f8f5;
  border: 1px solid #e2e5df;
  border-radius: 8px;
}

.backup-preview {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  background: #fffaf0;
  border: 1px solid #dfc68f;
  border-radius: 8px;
}

.backup-preview[hidden] {
  display: none;
}

.backup-preview span {
  color: var(--muted);
  font-size: 0.88rem;
}

.backup-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.backup-stats span {
  display: grid;
  gap: 3px;
  min-height: 70px;
  padding: 12px;
  background: #fff;
  border: 1px solid #eadcb7;
  border-radius: 7px;
}

.backup-stats strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.backup-warnings {
  display: grid;
  gap: 8px;
}

.backup-warnings:empty {
  display: none;
}

.backup-warning {
  padding: 10px 12px;
  color: #6f3c00;
  background: #fff3d6;
  border: 1px solid #e5c478;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.backup-warning.risk {
  color: #8d2d26;
  background: #fff0ee;
  border-color: #e5b9b4;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 14px;
}

.report-kpi-grid article,
.report-breakdown-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  background: #f9faf7;
  border: 1px solid #e0e5dc;
  border-radius: 8px;
}

.report-kpi-grid span {
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 900;
}

.report-kpi-grid strong,
.report-breakdown-grid strong {
  color: var(--green-dark);
}

.report-kpi-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.report-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding-top: 8px;
  color: inherit;
  background: transparent;
  border-top: 1px solid #e5e9e1;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.report-list-row:hover {
  color: var(--green-dark);
}

.report-list span,
.report-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.report-list-row strong {
  font-size: 0.86rem;
  text-align: right;
}

.filter-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.filter-summary {
  margin: 0;
  font-size: 0.88rem;
}

table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #ececea;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f7f7f3;
  font-size: 0.76rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.platform-tags span {
  padding: 4px 7px;
  color: #173d2d;
  background: #e7f0e8;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 800;
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.checklist-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pills span {
  padding: 4px 7px;
  color: #275f8f;
  background: #eef5fa;
  border: 1px solid #d5e4ef;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 900;
}

.checklist-pills span {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 900;
}

.checklist-pills .done {
  color: var(--green-dark);
  background: #e7f4e9;
  border: 1px solid #c9ddcd;
}

.checklist-pills .todo {
  color: #8d2d26;
  background: #fff0ee;
  border: 1px solid #e5b9b4;
}

.posting-status {
  display: grid;
  gap: 5px;
  min-width: 132px;
}

.posting-status span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  color: var(--muted);
  background: #f7f8f5;
  border: 1px solid #e1e5de;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 800;
}

.posting-status strong {
  color: var(--ink);
}

.muted-cell {
  color: var(--muted);
  font-size: 0.84rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.readiness-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.readiness-badge.ready {
  color: var(--green-dark);
  background: #e7f4e9;
}

.readiness-badge.almost {
  color: #6d531d;
  background: #fff4d3;
}

.readiness-badge.needs {
  color: #8d2d26;
  background: #fff0ee;
}

.readiness-badge.warning {
  color: #6d531d;
  background: #fff4d3;
}

.readiness-badge.neutral {
  color: #4e5963;
  background: #eef1f3;
}

td small {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.3;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: #202124;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  outline: 3px solid #e2a922;
  outline-offset: 2px;
}

.empty-row {
  color: var(--muted);
}

.empty-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink, #1f2320);
}

.empty-row span {
  display: block;
  max-width: 42rem;
  line-height: 1.4;
}

.empty-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.filter-summary.filters-on {
  font-weight: 600;
  color: var(--ink, #1f2320);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  color: #fff;
  background: #202124;
  border-radius: 7px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e2a922;
  outline-offset: 2px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.archive-panel {
  margin-top: 18px;
  padding: 16px;
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.archive-heading,
.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.archive-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.archive-heading strong,
.archive-item strong {
  display: block;
  color: var(--ink);
}

.archive-heading span,
.archive-item span,
.empty-archive {
  color: var(--muted);
  font-size: 0.88rem;
}

.archive-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.archive-item {
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #e7e7e1;
  border-radius: 7px;
}

.empty-archive {
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px dashed #d7d7d0;
  border-radius: 7px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.2fr);
    align-items: start;
  }

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

  .sidebar h1 {
    max-width: none;
    font-size: 1.45rem;
  }

  .stats-panel {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .mentor-steps {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

  .acquisition-flow {
    grid-template-columns: 1fr;
  }

  .readiness-flow {
    grid-template-columns: 1fr;
  }

  .readiness-queue {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workflow-board {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .item-detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary,
  .detail-notes {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mvp-path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-kpi-grid,
  .report-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-signals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) and (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .sidebar {
    padding: 22px;
  }

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

  .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    background: var(--canvas);
  }

  .workspace,
  .sidebar {
    padding: 16px;
  }

  .workspace {
    gap: 16px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .nav-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .nav-list a {
    min-height: 42px;
    padding: 10px 6px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    text-align: center;
    font-size: 0.82rem;
  }

  .stats-panel {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stats-panel div {
    display: grid;
    gap: 2px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
  }

  .stats-panel span {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .device-strip,
  .pricing-strip {
    grid-template-columns: 1fr;
  }

  .device-strip article,
  .pricing-strip article {
    min-height: 0;
  }

  .mentor-steps {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .mentor-steps article {
    min-height: 0;
  }

  .swimlane-list {
    grid-template-columns: 1fr;
  }

  .acquisition-flow article {
    min-height: 0;
  }

  .readiness-flow article {
    min-height: 0;
  }

  .readiness-queue {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .readiness-queue-column {
    min-height: 0;
  }

  .workflow-board {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .workflow-column {
    min-height: 0;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .filter-grid,
  .mvp-path,
  .report-kpi-grid,
  .report-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid article,
  .dashboard-card {
    min-height: 0;
  }

  .next-action {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .topbar,
  .panel-heading,
  .photo-strip,
  .button-row,
  .queue-actions,
  .filter-status-row,
  .detail-actions,
  .archive-heading,
  .archive-item {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .media-readiness,
  .marketplace-readiness {
    grid-template-columns: 1fr;
  }

  .media-readiness-row {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .button-row {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .file-button {
    width: 100%;
    min-height: 46px;
  }

  .backup-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row-actions,
  .intake-status {
    width: 100%;
  }

  .small-button {
    flex: 1;
  }

  .icon-button {
    width: 100%;
    min-height: 46px;
  }

  .panel {
    padding: 16px;
    box-shadow: 0 10px 28px rgba(28, 30, 34, 0.1);
  }

  .inventory-table.density-essential {
    min-width: 0;
  }

  .inventory-table.density-full {
    min-width: 960px;
  }

  .inventory-table .col-actions {
    position: static;
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-panel {
    grid-template-columns: 1fr;
  }

  .draft-meta {
    flex-direction: column;
  }
}
