:root {
  --bg: #f6f6f2;
  --surface: #fbfaf6;
  --paper: #fffefd;
  --ink: #141412;
  --muted: #6f6d66;
  --quiet: #96938a;
  --line: #deddd5;
  --line-strong: #c8c6ba;
  --accent: #0b766c;
  --accent-strong: #07574f;
  --accent-soft: #e7f2ef;
  --gold: #b7791f;
  --gold-soft: #fff4d8;
  --rose: #b94a48;
  --rose-soft: #fff1ef;
  --blue: #345f8f;
  --blue-soft: #edf4fb;
  --shadow: 0 22px 70px rgba(40, 39, 34, 0.12);
  --shadow-soft: 0 10px 28px rgba(40, 39, 34, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(20, 20, 18, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 20, 18, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

h1,
h2,
p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace-shell {
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.command-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  /* AUTH1：左品牌 | 中页签 | 右账户（三列对称，tabs 居中） */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 76px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: blur(18px);
}

/* 防止 grid 子项按内容撑破视口（4.14-F1） */
.command-bar > * {
  min-width: 0;
  max-width: 100%;
}

.brand-cluster,
.status-strip,
.command-actions,
.account-group {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-cluster {
  gap: 18px;
  justify-self: start;
}

.workspace-tabs {
  justify-self: center;
}

.account-group {
  justify-self: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-mark {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}

.bar-divider {
  width: 1px;
  height: 34px;
  background: var(--line-strong);
}

.doc-title-field {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.doc-title-field input {
  width: min(420px, 100%);
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  outline: none;
  text-overflow: ellipsis;
}

.doc-title-field input:focus {
  box-shadow: 0 1px 0 var(--accent);
}

.doc-title-field small {
  color: var(--quiet);
  font-size: 12px;
}

.status-strip {
  justify-content: center;
  gap: 10px;
}

.status-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f3ee;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--quiet);
}

.status-chip.is-live {
  border-color: #b7d8d1;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-chip.is-live::before {
  background: var(--accent);
}

.status-chip.is-warn {
  border-color: #ead59e;
  background: var(--gold-soft);
  color: #79510e;
}

.status-chip.is-warn::before {
  background: var(--gold);
}

.status-chip.is-points {
  border-color: #c5d4ea;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-chip.is-points::before {
  background: var(--blue);
}

.status-chip.is-error {
  border-color: #e5b8b6;
  background: var(--rose-soft);
  color: var(--rose);
}

.status-chip.is-error::before {
  background: var(--rose);
}

/* 积分条：轻量，不压过主流程；4.14-F1 防横向溢出 */
.points-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.points-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.points-main .status-chip {
  max-width: 100%;
  box-sizing: border-box;
  /* 长账户名可截断，避免 nowrap 撑破 390px */
  overflow: hidden;
  text-overflow: ellipsis;
}

.points-note {
  color: var(--quiet);
  font-size: 12px;
  max-width: 100%;
  white-space: normal;
}

.points-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.points-feedback {
  display: block;
  box-sizing: border-box;
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  min-height: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.points-feedback.is-ok {
  color: var(--accent-strong);
}

.points-feedback.is-warn {
  color: #79510e;
}

.points-feedback.is-error {
  color: var(--rose);
}

.points-debug {
  max-width: 100%;
  min-width: 0;
  font-size: 12px;
  color: var(--quiet);
}

.points-debug summary {
  cursor: pointer;
  user-select: none;
}

.points-debug[hidden] {
  display: none !important;
}

.command-actions {
  justify-content: flex-end;
  gap: 12px;
}

.workspace-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eeeeea;
}

.workspace-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.workspace-tab:hover {
  color: var(--ink);
}

.workspace-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 9px rgba(35, 34, 30, 0.11);
}

.select-label {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 264px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eeeeea;
}

.segment {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.segment:hover {
  color: var(--ink);
}

.segment.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 9px rgba(35, 34, 30, 0.11);
}

.primary-button,
.secondary-button,
.ghost-button,
.sample-button,
.enhance-button,
.mini-button {
  min-height: 38px;
  border-radius: 7px;
  font-weight: 750;
  white-space: nowrap;
}

.primary-button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #070707;
  background: #070707;
  color: #fff;
  box-shadow: 0 12px 24px rgba(7, 7, 7, 0.18);
}

.primary-button:hover {
  background: #24231f;
}

.secondary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.ghost-button,
.sample-button,
.enhance-button,
.mini-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.ghost-button:hover,
.sample-button:hover,
.enhance-button:hover,
.mini-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.workspace-canvas {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  gap: 18px;
  align-items: start;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.source-column,
.results-column,
.tab-panel,
.rewrite-stack {
  display: grid;
  min-width: 0;
  gap: 14px;
}

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

.paper {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.original-paper {
  min-height: 0;
}

.rewrite-paper {
  transform: none;
}

.panel-command {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-command h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

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

.paper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.paper-kicker {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.paper h1,
.paper h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.field-label {
  display: block;
  margin: 12px 20px 8px;
  color: var(--muted);
  font-size: 13px;
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 0;
}

.source-controls {
  display: grid;
  gap: 4px;
}

.source-platform-control {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 20px 0;
}

.sample-button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--blue);
}

.draft-input,
.material-grid input,
.material-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.draft-input {
  display: block;
  min-height: clamp(380px, 58dvh, 640px);
  margin: 0 20px 20px;
  width: calc(100% - 40px);
  resize: vertical;
  padding: 18px 18px 24px;
  line-height: 1.8;
}

.draft-input:focus,
.material-grid input:focus,
.material-grid textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.flow-command-card,
.review-command-card {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 10px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.flow-command-card::before,
.flow-command-card::after,
.review-command-card::before,
.review-command-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: var(--line-strong);
  opacity: 0.85;
}

.flow-command-card::before {
  left: -30px;
}

.flow-command-card::after {
  right: -30px;
}

.review-command-card::before {
  left: -30px;
}

.review-command-card::after {
  right: -30px;
}

.command-route {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.flow-command-card .primary-button {
  width: 100%;
  min-height: 46px;
  border-color: #111;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 22px rgba(17, 17, 17, 0.16);
}

.flow-command-card .primary-button:hover {
  background: #24231f;
  color: #fff;
}

.review-command-card .secondary-button {
  width: 100%;
  min-height: 44px;
}

.command-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.4;
}

.result-jump-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration-color: rgba(111, 109, 102, 0.35);
  text-underline-offset: 3px;
}

.result-jump-link:hover {
  color: var(--accent-strong);
}

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

.enhance-button {
  min-height: 36px;
  color: var(--blue);
}

.enhance-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f3ee;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: clamp(360px, 52dvh, 560px);
  place-content: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 20px;
}

.empty-state span {
  max-width: 34ch;
}

.result-view {
  padding: 18px 20px 20px;
}

.rewrite-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

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

.copy-state {
  color: var(--quiet);
  font-size: 12px;
  white-space: nowrap;
}

.copy-state[data-state="success"] {
  color: var(--accent-strong);
}

.copy-state[data-state="warn"] {
  color: #79510e;
}

.mini-button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--blue);
}

.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.meta-line {
  min-width: 0;
  overflow: hidden;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf9f5;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rewrite-text {
  min-height: clamp(260px, 34dvh, 440px);
  word-break: break-word;
  line-height: 1.78;
  font-size: 16px;
}

.rewrite-text p {
  margin: 0;
}

.rewrite-text p + p {
  margin-top: 12px;
}

.rewrite-text .rewrite-gap {
  min-height: 4px;
}

.rewrite-text mark {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.rewrite-annotations {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rewrite-annotations > strong {
  font-size: 14px;
}

.change-marker-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.change-marker-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.change-marker-list span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf9f5;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.change-marker-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.enhance-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.enhance-panel strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.enhance-panel span {
  color: var(--muted);
  font-size: 13px;
}

.utility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.utility-row .ghost-button {
  min-height: 34px;
  padding: 0 12px;
}

.overview-rail {
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.94);
}

.overview-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.overview-tabs strong {
  position: relative;
  font-size: 15px;
}

.overview-tabs strong::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 2px;
  background: var(--ink);
}

.overview-tabs span {
  color: var(--muted);
  font-size: 14px;
}

.outline-group {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.outline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.outline-head h2 {
  font-size: 15px;
  letter-spacing: 0;
}

.outline-head span {
  color: var(--quiet);
  font-size: 12px;
  white-space: nowrap;
}

.notes-list,
.risk-list {
  margin: 0;
  padding-left: 20px;
}

.notes-list li,
.risk-list li {
  padding-left: 4px;
}

.notes-list li + li,
.risk-list li + li {
  margin-top: 10px;
}

.notes-list:empty::before {
  content: "生成后展示结构、表达和平台适配说明。";
  display: block;
  margin-left: -20px;
  color: var(--muted);
  font-size: 14px;
}

.risk-list:empty::before {
  content: "生成后展示改写说明、事实边界与发布确认风险。";
  display: block;
  margin-left: -20px;
  color: var(--muted);
  font-size: 14px;
}

.fact-boundary-text {
  color: var(--muted);
  font-size: 14px;
}

.enhance-status {
  margin-top: 18px;
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.enhance-status strong {
  color: var(--accent-strong);
}

.diagnosis-panel {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.96);
  box-shadow: var(--shadow-soft);
}

.diagnosis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.diagnosis-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

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

.diagnosis-actions .secondary-button {
  min-height: 34px;
  padding: 0 12px;
}

.diagnosis-empty {
  display: grid;
  gap: 8px;
  min-height: 190px;
  place-content: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.diagnosis-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.diagnosis-view {
  display: grid;
  grid-template-columns: minmax(240px, 0.74fr) minmax(320px, 1.26fr);
  gap: 18px;
  padding: 18px 20px 20px;
}

.diagnosis-summary,
.diagnosis-section,
.diagnosis-footer {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.diagnosis-summary {
  display: grid;
  grid-row: span 2;
  gap: 18px;
  align-content: start;
  border-top: 0;
  padding-top: 0;
}

.diagnosis-summary h3,
.diagnosis-section h3 {
  margin: 0;
  font-size: 15px;
}

.diagnosis-summary p,
.diagnosis-sample,
.diagnosis-footer p {
  color: var(--ink);
  line-height: 1.75;
}

.score-block {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.score-block span,
.score-block small {
  color: var(--muted);
  font-size: 13px;
}

.score-block strong {
  color: var(--accent-strong);
  font-size: 42px;
  line-height: 1;
}

.diagnosis-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.diagnosis-section-head span {
  color: var(--quiet);
  font-size: 12px;
  white-space: nowrap;
}

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

.dimension-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #faf9f5;
}

.dimension-item strong {
  font-size: 13px;
}

.dimension-item span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
}

.dimension-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.diagnosis-list {
  margin: 0;
  padding-left: 20px;
}

.diagnosis-list li {
  padding-left: 4px;
  line-height: 1.65;
}

.diagnosis-list li + li {
  margin-top: 8px;
}

.diagnosis-sample {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.diagnosis-footer {
  display: grid;
  gap: 12px;
}

.upload-footnote {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.material-drawer {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.94);
}

.material-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.material-drawer summary::-webkit-details-marker {
  display: none;
}

.material-drawer summary::after {
  content: "收起";
  color: var(--muted);
  font-size: 13px;
}

.material-drawer:not([open]) summary::after {
  content: "展开";
}

.material-drawer summary span {
  font-weight: 750;
}

.material-drawer summary small {
  color: var(--muted);
}

.material-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 18px 18px;
}

.material-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.material-grid input,
.material-grid textarea {
  min-height: 40px;
  padding: 10px 11px;
  resize: vertical;
}

@media (max-width: 1280px) and (min-width: 821px) {
  /* 1280 / 1024 仍保持三列同一行 */
  .command-bar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .points-strip {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
  }

  .points-feedback {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }

  .workspace-tabs {
    justify-self: center;
  }

  .account-group {
    justify-self: end;
  }

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

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

  .flow-command-card::before,
  .flow-command-card::after,
  .review-command-card::before,
  .review-command-card::after {
    display: none;
  }

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

  .diagnosis-view {
    grid-template-columns: 1fr;
  }

  .diagnosis-summary {
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .command-bar {
    position: static;
    padding: 14px 16px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand account'
      'tabs tabs';
  }

  .brand-cluster {
    grid-area: brand;
    align-items: flex-start;
    gap: 12px;
  }

  .account-group {
    grid-area: account;
    justify-self: end;
  }

  .workspace-tabs {
    grid-area: tabs;
    justify-self: center;
    width: auto;
  }

  .brand-mark {
    font-size: 22px;
  }

  .bar-divider {
    height: 42px;
  }

  .command-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .select-label {
    font-size: 13px;
  }

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

  .primary-button {
    width: 100%;
  }

  .workspace-canvas {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  .paper-head,
  .rewrite-toolbar,
  .panel-command,
  .material-drawer summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .paper-head {
    min-height: auto;
  }

  .enhance-toolbar {
    grid-template-columns: 1fr;
  }

  .result-meta-grid {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions .secondary-button,
  .panel-actions .primary-button {
    width: 100%;
  }

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

  .draft-input,
  .empty-state,
  .rewrite-text {
    min-height: 300px;
  }

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

@media (max-width: 520px) {
  .status-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-chip {
    width: 100%;
  }

  .points-strip {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .points-main {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .points-note {
    white-space: normal;
    max-width: 100%;
  }

  .points-actions {
    width: 100%;
    max-width: 100%;
  }

  .points-feedback {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

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

  .sample-row,
  .utility-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sample-button,
  .ghost-button,
  .secondary-button,
  .mini-button {
    width: 100%;
  }

  .doc-title-field input {
    width: 100%;
  }
}
