:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #182033;
  --muted: #697386;
  --border: #dfe4ee;
  --primary: #2457e6;
  --primary-dark: #1d45b5;
  --danger: #c62828;
  --warning-bg: #fff7e5;
  --warning-border: #f0c46a;
  --success-bg: #eaf8ef;
  --error-bg: #fff0f0;
  --shadow: 0 16px 40px rgba(31, 45, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.55;
}

.container {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: min(300px, 42vw);
  object-fit: contain;
}

.nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
  color: var(--primary);
  background: #eef3ff;
}

.page {
  padding: 32px 0 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.hero > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 1120px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  max-width: 560px;
}

.hero-actions .button {
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: 0.15s ease;
}

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

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

.button.secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: #b8c3d8;
}

.button.danger {
  color: var(--danger);
  background: #fff;
  border-color: #f1b7b7;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 650;
}

.flash.success {
  background: var(--success-bg);
  border-color: #b9e6c6;
}

.flash.error {
  background: var(--error-bg);
  border-color: #efb7b7;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 138px;
  padding: 18px;
}

.metric-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.metric-card .small-strong {
  font-size: 15px;
  line-height: 1.35;
  word-break: break-all;
}

.metric-card small,
.result-row small,
.file-help,
.file-status,
.checkbox-row small,
.mode-info span {
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
  margin-bottom: 20px;
}

.panel {
  padding: 20px;
  margin-bottom: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.category-list,
.result-list {
  display: grid;
  gap: 10px;
}

.category-row,
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcff;
}

.result-row {
  color: var(--text);
  text-decoration: none;
}

.result-row:hover {
  border-color: #b8c3d8;
  background: #f4f7ff;
}

.result-row span {
  display: grid;
  gap: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: #eef3ff;
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.empty-state {
  padding: 28px;
  border: 1px dashed #b8c3d8;
  border-radius: 18px;
  text-align: center;
}

.muted-panel {
  background: #fbfcff;
  box-shadow: none;
}

.warning-panel {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  box-shadow: none;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 7px;
  background: #eef1f7;
  overflow-wrap: anywhere;
}

.upload-panel {
  max-width: 820px;
}

.upload-form {
  display: grid;
  gap: 18px;
}

.file-drop {
  display: grid;
  gap: 10px;
  padding: 28px;
  border: 2px dashed #b8c3d8;
  border-radius: 20px;
  background: #fbfcff;
  cursor: pointer;
}

.file-drop input {
  width: 100%;
}

.file-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1f7;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.file-title {
  font-size: 20px;
  font-weight: 800;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.mode-info {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcff;
}

.checkbox-row.disabled {
  opacity: 0.72;
}

.checkbox-row small {
  display: block;
  margin-top: 4px;
}

.steps {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.summary-box,
.json-box {
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8faff;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.details-block {
  margin-top: 14px;
}

.details-block summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 800;
}

.details-block pre {
  margin-top: 10px;
}

.bottom-actions {
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .brand-logo {
    height: 40px;
    max-width: min(380px, 82vw);
  }
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.processing-inline {
  display: none;
  gap: 3px;
  padding: 14px;
  border: 1px solid #b9d7ff;
  border-radius: 14px;
  background: #eef6ff;
}

.processing-inline.is-visible {
  display: grid;
}

.processing-inline[hidden] {
  display: none !important;
}

.processing-panel {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: start;
}

.processing-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #dbe7ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.manual-process-form {
  margin-top: 16px;
}

.small-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.compact-metrics .metric-card {
  min-height: 118px;
}

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

@keyframes progressShimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 640px) {
  .processing-panel {
    grid-template-columns: 1fr;
  }
}

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

.tight-header {
  margin-bottom: 12px;
}

.progress-area {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
}

.progress-track {
  width: 100%;
  height: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  background: #eaf1ff;
  overflow: hidden;
}

.progress-bar {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #6f93ff);
  overflow: hidden;
  transition: width 0.35s ease;
}

.progress-bar.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.38) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: progressShimmer 1.4s ease-in-out infinite;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress-meta strong {
  color: var(--primary);
  font-size: 15px;
}

.processing-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.processing-actions {
  margin-top: 16px;
  justify-content: flex-start;
}

.inline-form {
  margin: 0;
}

.text-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.account-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 260px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid #f1b7b7;
  border-radius: 999px;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
  font-weight: 800;
}

.nav-button:hover {
  background: #fff0f0;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  min-height: 58vh;
}

.auth-copy {
  padding: 20px 0;
}

.auth-card {
  max-width: 520px;
  width: 100%;
  justify-self: end;
}

.narrow-card {
  justify-self: start;
}

.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.field-row {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.field-row small {
  color: var(--muted);
  font-weight: 500;
}

.text-input,
.select-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.text-input:focus,
.select-input:focus {
  outline: 3px solid #dbe7ff;
  border-color: var(--primary);
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.compact-button {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.user-admin-layout {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

small {
  color: var(--muted);
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .nav,
  .account-box {
    justify-content: flex-start;
  }

  .nav,
  .account-box {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-card {
    justify-self: stretch;
    max-width: none;
  }
}

.nav {
  flex-wrap: nowrap;
}

.case-layout {
  align-items: start;
}

.checkbox-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.checkbox-fieldset legend {
  margin-bottom: 7px;
  font-weight: 800;
}

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

.participant-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 58px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcff;
  cursor: pointer;
}

.participant-option:hover {
  border-color: #b8c3d8;
  background: #f4f7ff;
}

.participant-option input {
  margin-top: 4px;
}

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

.participant-option strong {
  overflow-wrap: anywhere;
}

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

.relaxed-chip-list {
  margin-bottom: 12px;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.plain-list {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .participant-grid {
    grid-template-columns: 1fr;
  }
}

.textarea-input {
  resize: vertical;
  min-height: 110px;
}

.profile-context-card {
  display: grid;
  gap: 6px;
}

.core-workshop-layout {
  align-items: start;
}

.core-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.chat-panel,
.draft-panel {
  min-width: 0;
}

.chat-transcript {
  display: grid;
  gap: 14px;
  max-height: 660px;
  padding: 4px;
  overflow: auto;
}

.chat-message {
  display: flex;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.assistant {
  justify-content: flex-start;
}

.chat-bubble {
  display: grid;
  gap: 8px;
  max-width: min(82%, 720px);
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcff;
  box-shadow: 0 8px 24px rgba(31, 45, 61, 0.06);
}

.chat-message.user .chat-bubble {
  background: #eef3ff;
  border-color: #cfe0ff;
}

.chat-role {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-input-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

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

.attachment-chip {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.attachment-chip pre {
  max-height: 180px;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  overflow: auto;
  background: #f8faff;
  white-space: pre-wrap;
  font-size: 12px;
}

.code-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.warning-inline {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.draft-panel {
  position: sticky;
  top: 100px;
}

@media (max-width: 1080px) {
  .core-chat-layout {
    grid-template-columns: 1fr;
  }

  .draft-panel {
    position: static;
  }

  .chat-bubble {
    max-width: 100%;
  }
}

/* Virtual persona application */
.persona-launch-layout {
  align-items: start;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
}

.persona-launch-panel {
  position: sticky;
  top: 100px;
}

.persona-chat-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  gap: 20px;
  align-items: start;
}

.persona-side-panel {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 16px;
}

.persona-avatar-wrap {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 20%, #eef3ff 0%, #fbfcff 58%, #ffffff 100%);
  border: 1px solid var(--border);
}

.persona-avatar {
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 24px;
}

.persona-minibio {
  color: var(--muted);
  margin-bottom: 0;
}

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

.persona-meta-grid div {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcff;
}

.persona-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.persona-meta-grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

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

.persona-section h3 {
  margin-bottom: 0;
  font-size: 15px;
}

.persona-chat-panel {
  min-height: 660px;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
}

.persona-chat-transcript {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 390px;
  max-height: 660px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: auto;
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8ff 100%);
}

.persona-message {
  display: flex;
}

.persona-message.user {
  justify-content: flex-end;
}

.persona-message.assistant {
  justify-content: flex-start;
}

.persona-bubble {
  display: grid;
  gap: 7px;
  max-width: min(78%, 720px);
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 45, 61, 0.06);
}

.persona-message.user .persona-bubble {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.persona-message.user .chat-role,
.persona-message.user small {
  color: rgba(255, 255, 255, 0.78);
}

.persona-message.assistant .persona-bubble {
  background: #ffffff;
}

.persona-chat-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.persona-empty-chat {
  align-self: center;
}

@media (max-width: 1080px) {
  .persona-launch-layout,
  .persona-chat-layout {
    grid-template-columns: 1fr;
  }

  .persona-launch-panel,
  .persona-side-panel {
    position: static;
  }

  .persona-bubble {
    max-width: 100%;
  }
}

/* Refined Profile creation flow */
.project-table-panel {
  margin-top: 4px;
}

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

.workflow-step {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.workflow-step h3 {
  margin: 0;
  font-size: 16px;
}

.workflow-step p,
.instruction-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.instruction-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.instruction-list article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.member-scroll-select {
  display: grid;
  gap: 8px;
  max-height: 310px;
  margin-top: 10px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
}

.member-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s ease;
}

.member-option:hover {
  border-color: #b8c3d8;
  background: #f4f7ff;
}

.member-option input {
  margin-top: 4px;
}

.member-option-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-option-main strong {
  overflow-wrap: anywhere;
}

/* Keep action cells as real table cells. Using flex directly on <td> breaks table layout in some browsers. */
td.table-actions {
  display: table-cell;
  width: 1%;
  min-width: 148px;
  white-space: nowrap;
}

.table-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.table-action-group form {
  margin: 0;
}

.table-action-group .compact-button {
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  td.table-actions {
    min-width: 132px;
  }
}


/* Collection / Core Studio refinement */
.core-guide-panel .guide-list {
  max-width: 980px;
}

.method-table {
  min-width: 980px;
}

.method-table th:nth-child(1),
.method-table td:nth-child(1) {
  width: 260px;
}

.method-table th:nth-child(2),
.method-table td:nth-child(2) {
  width: 110px;
}

.method-table th:nth-child(3),
.method-table td:nth-child(3) {
  width: 120px;
}

.method-table th:nth-child(4),
.method-table td:nth-child(4) {
  width: auto;
  min-width: 360px;
}

.method-table th:nth-child(5),
.method-table td:nth-child(5) {
  width: 220px;
}

.method-table td {
  vertical-align: middle;
}

@media (max-width: 920px) {
  .hero {
    display: grid;
  }

  .hero-actions {
    justify-content: flex-start;
    max-width: none;
  }
}


/* Collection/Core refinement */
.hero > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.page-lead-wide {
  max-width: 1120px;
}

.detail-hero,
.studio-hero {
  align-items: flex-start;
}

.detail-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  max-width: 520px;
}

.collection-layout {
  grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.22fr);
}

.definition-list {
  display: grid;
  gap: 12px;
}

.definition-list div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcff;
}

.definition-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.definition-list strong {
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.method-table {
  min-width: 980px;
}

.method-table th:first-child,
.method-table td:first-child {
  width: 28%;
}

.method-description-column,
.method-description {
  width: 38%;
}

.method-description small {
  display: block;
  max-width: 560px;
  line-height: 1.7;
}

.table-action-group {
  justify-content: flex-start;
}

@media (min-width: 1101px) {
  .table-action-group {
    justify-content: flex-end;
  }
}

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

  .detail-actions {
    justify-content: flex-start;
    max-width: none;
  }
}


.core-workshop-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
}

.core-guide-panel .plain-list {
  line-height: 1.8;
}

.profile-library-table,
.project-table,
.overview-table,
.method-table {
  table-layout: auto;
}

.table-actions {
  vertical-align: middle;
}
