.workspace {
  padding-block: 55px 90px;
}

.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 30px;
}

.workspace-heading h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.15rem);
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.workspace-heading p:last-child {
  max-width: 740px;
  margin: 16px 0 0;
  color: var(--muted);
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.workspace-actions > .button {
  white-space: nowrap;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.demo-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.identity-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--white);
  background: var(--navy);
  font-weight: 800;
}

.demo-identity strong,
.demo-identity small {
  display: block;
  white-space: nowrap;
}

.demo-identity strong {
  font-size: 0.86rem;
}

.demo-identity small {
  color: var(--muted);
  font-size: 0.72rem;
}

.demo-notice {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid #ead7ad;
  border-radius: 12px;
  color: #694c1f;
  background: #fff6e1;
  font-size: 0.87rem;
}

.demo-notice strong {
  flex: 0 0 auto;
}

.service-dashboard {
  scroll-margin-top: 90px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 40px rgba(23, 27, 40, 0.04);
}

.service-dashboard[hidden],
.report-view[hidden],
.status-panel[hidden],
.demo-feedback[hidden] {
  display: none;
}

.workspace button:focus-visible,
.materials-dialog button:focus-visible,
.materials-dialog input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.dashboard-heading h2 {
  margin: 0;
  font-size: 1.55rem;
}

.dashboard-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.status-tabs {
  display: flex;
  gap: 28px;
  margin-top: 29px;
  border-bottom: 1px solid var(--line);
}

.status-tabs button {
  padding: 0 2px 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.status-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  margin-left: 5px;
  padding-inline: 5px;
  border-radius: 999px;
  background: #f3f1ec;
  font-size: 0.75rem;
}

.status-panel {
  display: grid;
  gap: 12px;
  padding-top: 22px;
}

.service-record {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbf8;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

button.service-record {
  cursor: pointer;
}

button.service-record:hover {
  border-color: #edb09e;
  background: #fffaf5;
}

.record-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--accent-dark);
  background: #fff0e8;
  font-weight: 800;
}

.record-main {
  min-width: 0;
}

.record-main strong,
.record-main small {
  display: block;
}

.record-main strong {
  font-size: 0.96rem;
}

.record-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.record-state {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.record-complete {
  color: #42624b;
  background: #eaf0eb;
}

.record-processing {
  color: #82571f;
  background: #fff0ce;
}

.record-arrow {
  color: var(--accent-dark);
  font-weight: 800;
}

.processing-record {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.dashboard-help {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-help a {
  color: var(--accent-dark);
  font-weight: 800;
}

.demo-feedback {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  color: #42624b;
  background: #eaf0eb;
  font-size: 0.84rem;
}

.report-return {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 0.85rem;
}

.report-view {
  scroll-margin-top: 90px;
}

.report-return button {
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.materials-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100% - 36px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.materials-dialog::backdrop {
  background: rgba(17, 27, 44, 0.58);
}

.materials-dialog form {
  padding: 28px;
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 1.6rem;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #f4f2ee;
  font-size: 1.4rem;
  cursor: pointer;
}

.materials-dialog form > p {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-label {
  display: block;
  margin-top: 22px;
  font-size: 0.9rem;
  font-weight: 800;
}

.materials-dialog input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 15px;
  border: 1px dashed #b9c2ce;
  border-radius: 12px;
  background: #faf9f6;
  font: inherit;
  font-size: 0.85rem;
}

.selected-files {
  overflow-wrap: anywhere;
}

.materials-dialog .upload-note {
  padding: 11px 13px;
  border-radius: 10px;
  background: #f5f3ed;
  font-size: 0.8rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
}

.dialog-actions button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.workspace-sidebar {
  position: sticky;
  top: 94px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

.sidebar-product {
  display: grid;
  gap: 4px;
  padding: 24px 22px;
  border-bottom: 1px solid var(--line);
  background: #f7f5f0;
}

.sidebar-kicker {
  color: var(--muted);
  font-size: 0.74rem;
}

.sidebar-product strong {
  font-size: 1.05rem;
}

.sidebar-product > span:last-child {
  color: var(--accent-dark);
  font-weight: 800;
}

.sidebar-menu {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.sidebar-menu button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 10px;
  color: #4d5463;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sidebar-menu button:hover {
  background: #f6f2ee;
}

.sidebar-menu button[aria-selected="true"] {
  color: var(--accent-dark);
  background: #fff0e8;
}

.sidebar-menu button span {
  opacity: 0.55;
  font-size: 0.76rem;
}

.sidebar-contact {
  display: block;
  margin: 0 14px 15px;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 800;
}

.workspace-content {
  min-width: 0;
}

.report-panel {
  min-height: 600px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 40px rgba(23, 27, 40, 0.04);
}

.report-panel[hidden] {
  display: none;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-kicker {
  color: var(--accent-dark);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.panel-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.panel-intro {
  margin: 23px 0 28px;
  color: var(--muted);
}

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

.brief-grid > div {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfbf8;
}

.brief-grid span,
.finding-label {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.brief-grid strong {
  font-size: 0.9rem;
}

.content-title,
.plan-section h3 {
  margin: 34px 0 14px;
  font-size: 1.17rem;
}

.deliverables {
  display: grid;
  gap: 9px;
}

.deliverables button {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.deliverables button:hover {
  border-color: #edb09e;
  background: #fff9f5;
}

.deliverables button > span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.deliverables button > div {
  flex: 1;
}

.deliverables strong,
.deliverables small {
  display: block;
}

.deliverables strong {
  font-size: 0.94rem;
}

.deliverables small {
  color: var(--muted);
  font-size: 0.78rem;
}

.deliverables b {
  color: var(--accent);
}

.report-summary,
.recommendation-strip {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: 14px;
  background: #eaf0eb;
}

.report-summary span {
  color: #42624b;
  font-size: 0.77rem;
  font-weight: 800;
}

.report-summary p {
  margin: 7px 0 0;
  font-weight: 600;
}

.finding-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbf8;
}

.finding-card h3 {
  margin: 10px 0;
  font-size: 1.02rem;
}

.finding-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
}

.key-finding {
  margin-bottom: 14px;
  border-color: #d6e4d7;
  background: #eaf0eb;
}

.key-finding h3 {
  font-size: 1.28rem;
}

.recommendation-strip {
  background: #fff2e9;
  font-size: 0.9rem;
}

.note-analysis {
  display: grid;
  gap: 17px;
}

.note-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbf8;
}

.note-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.note-top strong {
  color: var(--muted);
}

.note-card h3 {
  margin: 10px 0;
  font-size: 1.06rem;
}

.note-card p {
  margin: 8px 0;
  color: #4d5463;
  font-size: 0.89rem;
}

.rewrite-box {
  display: grid;
  gap: 5px;
  margin-top: 15px;
  padding: 13px 15px;
  border-radius: 9px;
  background: #fff0e7;
}

.rewrite-box span {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.rewrite-box strong {
  font-size: 0.9rem;
}

.plan-section {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.plan-section:last-of-type {
  border-bottom: 0;
}

.plan-section h3 {
  margin-top: 26px;
}

.content-steps,
.topic-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-steps li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 9px;
  background: #f7f6f2;
  font-size: 0.88rem;
}

.content-steps strong {
  color: var(--accent-dark);
}

blockquote {
  margin: 0;
  padding: 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: #fff3ec;
  font-size: 0.96rem;
  font-weight: 600;
}

.topic-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.87rem;
}

.topic-list span {
  color: var(--accent-dark);
  font-weight: 800;
}

.report-end {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

@media (max-width: 900px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
  }

  .sidebar-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-menu button {
    display: block;
    text-align: center;
  }

  .sidebar-menu button span,
  .sidebar-contact {
    display: none;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding-block: 38px 70px;
  }

  .workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-heading {
    gap: 20px;
  }

  .demo-identity {
    width: fit-content;
  }

  .workspace-actions {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .demo-notice {
    display: block;
  }

  .demo-notice strong {
    display: block;
    margin-bottom: 4px;
  }

  .service-dashboard {
    padding: 22px 17px;
  }

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

  .status-tabs {
    gap: 24px;
  }

  .service-record,
  .processing-record {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 14px 12px;
  }

  .record-icon {
    width: 42px;
    height: 42px;
  }

  .record-arrow {
    display: none;
  }

  .record-main strong {
    font-size: 0.86rem;
  }

  .record-main small {
    font-size: 0.74rem;
  }

  .record-state {
    padding: 4px 7px;
    font-size: 0.7rem;
  }

  .materials-dialog form {
    padding: 22px 18px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }

  .sidebar-product {
    padding: 16px;
  }

  .sidebar-menu {
    gap: 3px;
    padding: 8px;
  }

  .sidebar-menu button {
    padding: 8px 3px;
    font-size: 0.78rem;
  }

  .report-panel {
    min-height: 0;
    padding: 24px 18px;
  }

  .panel-heading {
    gap: 8px;
  }

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

}
