:root {
  --cloud-dancer: #F1F0EA;
  --cloud-dancer-light: #FAF9F4;
  --ice-melt: #D7E7F2;
  --baltic-sea: #78B7D5;
  --blue-fusion: #48687A;
  --lemon-icing: #F7EEC8;
  --raindrops-roses: #E8D4DA;
  --nimbus-cloud: #D8D8DA;
  --cloud-cover: #9B9692;
  --hematite: #6F6B65;
  --bg: #ECEBE5;
  --surface: #FFFDF8;
  --surface-alt: #EBE9E2;
  --surface-tint: #F5F3EC;
  --border: #C7C2B9;
  --border-strong: #AFA89E;
  --text: #252B30;
  --text-muted: #5D5851;
  --primary: #48687A;
  --primary-hover: #354F5F;
  --primary-soft: #EAF3F8;
  --accent: #78B7D5;
  --accent-soft: #EAF3F8;
  --sub-accent: #78B7D5;
  --sub-accent-soft: #EAF3F8;
  --status-success-bg: #EAF3F8;
  --status-success-text: #3D6477;
  --status-success-dot: #78B7D5;
  --status-warning-bg: #F7EEC8;
  --status-warning-text: #776B2E;
  --status-warning-dot: #B8A64A;
  --status-danger-bg: #E8D4DA;
  --status-danger-text: #7D4F5B;
  --status-danger-dot: #B97887;
  --status-info-bg: #EAF3F8;
  --status-info-text: #3D6477;
  --status-info-dot: #78B7D5;
  --status-ai-bg: #EEEDE8;
  --status-ai-text: #5F5B55;
  --status-ai-dot: #9B9692;
  --status-neutral-bg: #EEEDE8;
  --status-neutral-text: #6F6B65;
  --status-neutral-dot: #9B9692;
  --shadow: 0 18px 46px rgba(72, 104, 122, .18);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    linear-gradient(115deg, rgba(215, 231, 242, .82) 0%, rgba(250, 249, 244, .90) 36%, rgba(236, 235, 229, .98) 100%),
    linear-gradient(180deg, var(--cloud-dancer), var(--bg) 260px);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--primary-hover); text-decoration: none; font-weight: 650; }
a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.button-link { display: inline-block; border-radius: 7px; padding: 9px 12px; background: var(--primary); color: #fff; font-weight: 750; box-shadow: 0 0 0 3px rgba(81, 110, 117, .13); }
.button-link:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }
.topbar { height: 56px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 16px; align-items: center; padding: 0 24px; background: rgba(255, 253, 248,.96); border-bottom: 1px solid var(--border-strong); backdrop-filter: blur(10px); }
.topbar nav { grid-column: 2; grid-row: 1; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.quick-nav a { color: var(--primary-hover); padding: 6px 8px; border-radius: 7px; font-size: 13px; }
.quick-nav a:hover { background: var(--primary-soft); text-decoration: none; }
.brand { font-weight: 800; color: var(--text); }
.reward-ticker {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid rgba(81,110,117,.22);
  border-radius: 999px;
  background: rgba(215, 231, 242,.62);
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.reward-ticker span,
.reward-ticker a { display: inline-flex; align-items: center; }
.reward-ticker .ticker-icon { color: var(--baltic-sea); font-size: 14px; line-height: 1; text-decoration: none; }
.reward-ticker .ticker-icon:hover { color: var(--primary-hover); text-decoration: none; }
.reward-current {
  min-width: auto;
  padding: 2px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--primary-hover);
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.reward-current:hover { background: rgba(81,110,117,.12); color: var(--primary-hover); }
.reward-ticker em {
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary-hover);
  font-style: normal;
  font-size: 9px;
  text-transform: uppercase;
}
.page { max-width: 1180px; margin: 0 auto; padding: 20px 20px 48px; }
.owner-request-banner {
  display: block;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 183, 213, .45);
  border-radius: 8px;
  background: rgba(215, 231, 242, .72);
  color: var(--primary-hover);
  font-weight: 850;
}
.owner-request-banner:hover { text-decoration: none; background: rgba(215, 231, 242, .92); }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
}
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
}
.breadcrumbs a { color: var(--primary-hover); }
.breadcrumbs a::after {
  content: "/";
  margin-left: 7px;
  color: rgba(95, 103, 108, .48);
  font-weight: 650;
}

.reward-head { margin-bottom: 14px; }
.reward-summary-panel {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 2fr;
  gap: 18px;
  align-items: stretch;
}
.reward-hero {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(120, 183, 213, .42);
  border-radius: 8px;
  background: rgba(215, 231, 242, .58);
}
.reward-hero span,
.reward-summary-grid span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.reward-hero strong {
  color: var(--primary-hover);
  font-size: 34px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.reward-hero small,
.reward-summary-grid small { color: var(--text-muted); font-weight: 700; }
.reward-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.reward-summary-grid > div {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,253,248,.82);
}
.reward-summary-grid strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}
.reward-rules h2 { margin-bottom: 10px; }
.reward-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.reward-rule-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(241, 240, 234, .64);
}
.reward-rule-grid span { color: var(--text-muted); font-weight: 650; }
.reward-section { padding: 0; overflow: hidden; }
.reward-section details { padding: 0; }
.reward-section summary {
  cursor: pointer;
  list-style-position: inside;
}
.reward-section-title {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.reward-section-title h2 { margin: 0 0 3px; }
.reward-section-title p { margin: 0; color: var(--text-muted); font-weight: 650; }
.reward-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.reward-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.reward-table th:nth-child(1) { width: 9%; }
.reward-table th:nth-child(2) { width: 26%; }
.reward-table th:nth-child(3) { width: 11%; }
.reward-table th:nth-child(4) { width: 7%; }
.reward-table th:nth-child(5),
.reward-table th:nth-child(6),
.reward-table th:nth-child(7) { width: 9%; }
.reward-table th:nth-child(8) { width: 20%; }
.reward-table th,
.reward-table td { vertical-align: top; }
.reward-table .money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reward-job {
  font-weight: 850;
  overflow-wrap: anywhere;
}
.reward-job small,
.reward-service-cell span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}
.reward-service-cell strong {
  display: block;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}
.reward-reason {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.counted-money strong { color: var(--primary-hover); }
.reward-confirmed { background: rgba(234, 243, 248, .72); }
.reward-delivered_estimate { background: rgba(247, 238, 200, .52); }
.reward-test_excluded { color: var(--text-muted); background: rgba(232, 212, 218, .22); }
.reward-pipeline_excluded,
.reward-pricing_missing { color: var(--text-muted); }
.muted { color: var(--text-muted); }
.copy-link-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.copy-link-box code {
  display: block;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(215, 231, 242, .36);
  overflow-wrap: anywhere;
}
.breadcrumbs span:last-child {
  color: var(--text);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(215, 231, 242,.46);
}
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.section-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.button-link-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  line-height: 1.2;
  border-color: var(--border-strong);
  background: rgba(255, 253, 248, .96);
}
.button-link-light:hover { color: var(--text); text-decoration: none; }
h1, h2 { margin: 0 0 8px; line-height: 1.2; letter-spacing: 0; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
p { margin: 0; color: var(--text-muted); }
.panel { background: rgba(255, 253, 248,.90); border: 1px solid var(--border); border-radius: 8px; padding: 16px; box-shadow: 0 1px 0 rgba(39,49,58,.03); }
.auth-shell {
  max-width: 640px;
  margin: 34px auto;
}
.auth-panel {
  padding: 24px;
}
.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.auth-form button {
  width: fit-content;
  min-width: 140px;
}
.auth-notice {
  margin-top: 14px;
  margin-bottom: 14px;
}
.auth-help {
  margin-top: 14px;
  color: var(--text-muted);
}
.account-fieldset {
  display: grid;
  gap: 12px;
  margin: 4px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(215, 231, 242, .20);
}
.account-fieldset legend {
  padding: 0 6px;
  font-weight: 800;
}
.account-form {
  display: grid;
  gap: 12px;
}
.account-form h2:not(:first-child) {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.verification-card {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 253, 248, .72);
}
.verification-card h3 {
  margin: 0;
  font-size: 15px;
}
.telegram-login {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.telegram-login h2 {
  margin-bottom: 4px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.toolbar, .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.form-grid { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 7px; padding: 9px 10px; background: var(--surface); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sub-accent-soft); border-color: var(--baltic-sea); }
textarea { resize: vertical; }
button { border: 0; border-radius: 7px; padding: 9px 12px; background: var(--primary); color: #fff; font-weight: 750; cursor: pointer; box-shadow: 0 0 0 3px rgba(81, 110, 117, .12); }
button:hover { background: var(--primary-hover); }
.button-primary { background: var(--primary); box-shadow: 0 0 0 3px rgba(81, 110, 117, .15); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { background: var(--surface-tint); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
.button-secondary:hover { background: var(--cloud-dancer); }
.button-warning { background: var(--status-warning-bg); color: var(--status-warning-text); border: 1px solid rgba(224, 165, 58, .35); box-shadow: none; }
.button-warning:hover { background: var(--lemon-icing); }
.button-danger { background: var(--status-danger-bg); color: var(--status-danger-text); border: 1px solid rgba(217, 108, 124, .35); box-shadow: none; }
button:disabled { background: var(--cloud-cover); color: #fff; cursor: not-allowed; box-shadow: none; border: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
tr { border-left: 4px solid transparent; }
.row-danger { border-left-color: var(--status-danger-dot); background: linear-gradient(90deg, rgba(253,235,236,.76), transparent 46%); }
.row-warning { border-left-color: var(--status-warning-dot); background: linear-gradient(90deg, rgba(255,244,223,.72), transparent 46%); }
.row-success { border-left-color: var(--status-success-dot); background: linear-gradient(90deg, rgba(215, 231, 242,.52), transparent 44%); }
.row-info { border-left-color: var(--status-info-dot); background: linear-gradient(90deg, rgba(234,243,250,.52), transparent 42%); }
.row-neutral { border-left-color: var(--status-neutral-dot); background: linear-gradient(90deg, rgba(241,243,245,.58), transparent 42%); }
.status { font-weight: 750; }
.status-pill, .risk-badge, .action-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  white-space: normal;
  border: 1px solid rgba(72, 104, 122, .14);
}
.deal-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 850;
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  border: 1px solid rgba(72, 104, 122, .14);
}
.deal-inquiry { background: var(--status-info-bg); color: var(--status-info-text); }
.deal-quoted { background: var(--status-ai-bg); color: var(--status-ai-text); }
.deal-waiting { background: var(--status-warning-bg); color: var(--status-warning-text); }
.deal-ordered { background: var(--status-success-bg); color: var(--status-success-text); }
.deal-lost { background: var(--status-danger-bg); color: var(--status-danger-text); }
.status-pill::before, .risk-badge::before, .action-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}
.status-success { background: var(--status-success-bg); color: var(--status-success-text); }
.status-success::before { background: var(--status-success-dot); }
.status-warning { background: var(--status-warning-bg); color: var(--status-warning-text); }
.status-warning::before { background: var(--status-warning-dot); }
.status-danger { background: var(--status-danger-bg); color: var(--status-danger-text); }
.status-danger::before { background: var(--status-danger-dot); }
.status-info { background: var(--status-info-bg); color: var(--status-info-text); }
.status-info::before { background: var(--status-info-dot); }
.status-ai { background: var(--status-ai-bg); color: var(--status-ai-text); }
.status-ai::before { background: var(--status-ai-dot); }
.status-neutral { background: var(--status-neutral-bg); color: var(--status-neutral-text); }
.status-neutral::before { background: var(--status-neutral-dot); }
.risk-low { background: var(--status-success-bg); color: var(--status-success-text); }
.risk-low::before { background: var(--status-success-dot); }
.risk-medium { background: var(--status-warning-bg); color: var(--status-warning-text); }
.risk-medium::before { background: var(--status-warning-dot); }
.risk-high { background: var(--status-danger-bg); color: var(--status-danger-text); }
.risk-high::before { background: var(--status-danger-dot); }
.risk-neutral { background: var(--status-neutral-bg); color: var(--status-neutral-text); }
.risk-neutral::before { background: var(--status-neutral-dot); }
.action-send { background: var(--status-success-bg); color: var(--status-success-text); }
.action-send::before { background: var(--status-success-dot); }
.action-copy { background: var(--status-ai-bg); color: var(--status-ai-text); }
.action-copy::before { background: var(--status-ai-dot); }
.action-run { background: var(--status-info-bg); color: var(--status-info-text); }
.action-run::before { background: var(--status-info-dot); }
.action-review { background: var(--status-warning-bg); color: var(--status-warning-text); }
.action-review::before { background: var(--status-warning-dot); }
.action-wait { background: var(--status-neutral-bg); color: var(--status-neutral-text); }
.action-wait::before { background: var(--status-neutral-dot); }
.action-escalate { background: var(--status-danger-bg); color: var(--status-danger-text); }
.action-escalate::before { background: var(--status-danger-dot); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notice, .error { border-radius: 7px; padding: 10px 12px; margin-bottom: 14px; background: var(--status-success-bg); color: var(--status-success-text); border: 1px solid rgba(91,155,114,.25); }
.error { background: var(--status-danger-bg); color: var(--status-danger-text); border-color: rgba(217,108,124,.28); }
.sticky-tip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(122, 150, 170, .24);
  border-left: 4px solid var(--baltic-sea);
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(215, 231, 242,.46), rgba(255, 253, 248,.86));
  box-shadow: 0 8px 24px rgba(39,49,58,.04);
}
.sticky-tip strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}
.sticky-tip p {
  font-size: 13px;
  line-height: 1.4;
}
.tip-dismiss {
  flex: 0 0 auto;
  min-width: auto;
  padding: 6px 9px;
  border: 1px solid var(--border);
  background: rgba(255, 253, 248,.78);
  color: var(--text-muted);
  box-shadow: none;
  font-size: 12px;
}
.tip-dismiss:hover { background: #fff; color: var(--text); }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px; margin: 0; }
dt { font-weight: 750; color: var(--text-muted); }
dd { margin: 0; word-break: break-word; }
.artifact { white-space: pre-wrap; overflow: auto; background: #27313A; color: var(--cloud-dancer); border-radius: 8px; padding: 16px; }
.hidden { display: none !important; }
.artifact-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.artifact-toolbar h2 { margin-bottom: 4px; }
.segmented-control {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
}
.segmented-control button {
  min-width: 78px;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
}
.segmented-control button:hover { background: #fff; color: var(--text); }
.segmented-control button.active {
  background: var(--primary);
  color: #fff;
}
.artifact-view-panel { margin-bottom: 16px; }
.sheet-preview {
  overflow: auto;
  max-height: calc(100vh - 260px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(39, 49, 58, .07);
}
.sheet-table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.sheet-table th,
.sheet-table td {
  min-width: 140px;
  max-width: 360px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.sheet-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--primary-soft);
  color: var(--primary-hover);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 850;
}
.sheet-table .row-number {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 54px;
  max-width: 54px;
  width: 54px;
  text-align: right;
  color: var(--text-muted);
  background: var(--surface-alt);
  font-variant-numeric: tabular-nums;
}
.sheet-table thead .row-number {
  top: 0;
  z-index: 4;
  background: var(--surface-alt);
}
.sheet-table tbody tr:nth-child(even) td:not(.row-number) { background: var(--cloud-dancer-light); }
.sheet-table tbody tr:hover td { background: var(--status-info-bg); }
.footer-action { margin-top: 16px; }
.sample-actions { margin-top: 12px; }
.sample-actions button { background: var(--primary); }
.sample-actions button:hover { background: var(--primary-hover); }
.operator-focus {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(190px, auto);
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid rgba(72, 104, 122, .42);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(215, 231, 242,.92), rgba(255, 253, 248,1) 52%, rgba(241, 240, 234,.96)),
    var(--surface);
  box-shadow: 0 18px 40px rgba(39, 49, 58, .16);
}
.operator-focus-alert {
  border-color: rgba(224, 165, 58, .45);
  background:
    linear-gradient(135deg, rgba(246,237,194,.92), rgba(255, 253, 248,.96) 48%, rgba(243,226,230,.72)),
    var(--surface);
}
.focus-progress { display: grid; justify-items: center; gap: 9px; }
.progress-ring {
  --progress: 20%;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--progress), #DAD6CE 0);
  box-shadow: inset 0 0 0 1px rgba(81,110,117,.28), 0 2px 8px rgba(39, 49, 58, .10);
  position: relative;
}
.progress-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 850;
  color: var(--primary-hover);
}
.focus-progress p { font-weight: 800; color: var(--text-muted); }
.focus-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 253, 248,.96);
  border: 1px solid rgba(72, 104, 122, .14);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.focus-main h2 { margin-bottom: 9px; font-size: 25px; }
.focus-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.focus-copy { max-width: 680px; font-size: 15px; color: var(--text); }
.focus-action { justify-self: end; width: 100%; max-width: 300px; }
.focus-action form { margin: 0; }
.focus-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
}
.focus-upload { display: grid; gap: 10px; }
.mini-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.mini-steps span {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 253, 248, .98);
  color: var(--text-muted);
  text-align: center;
  font-weight: 800;
  font-size: 12px;
}
.mini-steps span.done {
  background: var(--status-success-bg);
  border-color: rgba(72, 104, 122,.32);
  color: var(--status-success-text);
}
.mini-steps span.active {
  background: #DDECF5;
  border-color: var(--baltic-sea);
  color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(120, 183, 213,.18);
}
.focus-output-board {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 253, 248,.98);
  box-shadow: 0 10px 28px rgba(39, 49, 58, .12);
}
.delivery-ready-board {
  border-color: rgba(120, 183, 213,.28);
  background:
    linear-gradient(135deg, rgba(215, 231, 242,.62), rgba(255, 253, 248,.96) 48%, rgba(215, 231, 242,.62)),
    var(--surface);
}
.output-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.output-head h2 { margin-bottom: 5px; }
.focus-artifacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.focus-artifact {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 132px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(39,49,58,.03);
}
.focus-artifact:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.focus-artifact strong {
  font-size: 16px;
  line-height: 1.25;
  word-break: break-word;
}
.focus-artifact small {
  color: var(--text-muted);
  font-weight: 650;
}
.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}
.artifact-actions .compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 8px;
  line-height: 1;
}
.compact-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}
.inline-artifact-preview {
  max-height: 210px;
  margin: 6px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 253, 248,.78);
  color: var(--text);
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.artifact-role {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  font-size: 12px;
  font-weight: 850;
}
.artifact-delivery_package {
  border-color: rgba(120, 183, 213,.35);
  background: linear-gradient(180deg, var(--surface), rgba(215, 231, 242,.46));
}
.artifact-delivery_package .artifact-role { background: var(--status-success-bg); color: var(--status-success-text); }
.artifact-customer_delivery_message {
  border-color: rgba(72, 104, 122,.34);
  background: linear-gradient(180deg, var(--surface), rgba(232, 212, 218,.56));
}
.artifact-customer_delivery_message .artifact-role,
.artifact-customer_clarification_message .artifact-role { background: var(--status-ai-bg); color: var(--status-ai-text); }
.artifact-shopify_csv .artifact-role { background: var(--status-info-bg); color: var(--status-info-text); }
.artifact-missing_fields_report .artifact-role { background: var(--status-warning-bg); color: var(--status-warning-text); }
.artifact-change_log .artifact-role,
.artifact-staff_delivery_checklist .artifact-role { background: var(--primary-soft); color: var(--primary-hover); }
.delivery-check {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.delivery-check li {
  padding: 12px;
  border: 1px solid rgba(120, 183, 213,.24);
  border-radius: 10px;
  background: rgba(215, 231, 242,.48);
  color: var(--text);
  font-weight: 650;
}
.output-missing {
  border-color: rgba(224, 165, 58, .40);
  background: var(--status-warning-bg);
}
.redo-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px dashed rgba(72,104,122,.58);
  border-radius: 12px;
  background: rgba(255, 253, 248,.92);
}
.redo-board h2 { margin-bottom: 4px; font-size: 17px; }
.redo-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.redo-actions form { margin: 0; }
.details-shell {
  margin-top: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 253, 248,.96);
  box-shadow: 0 8px 22px rgba(39,49,58,.08);
}
.details-shell > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  color: var(--text);
}
.details-shell[open] > summary {
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 12px 12px 0 0;
}
.details-content {
  display: grid;
  gap: 16px;
  padding: 16px;
  max-width: 100%;
  overflow-x: hidden;
}
.details-content .panel,
.details-content .grid-2,
.details-content table {
  min-width: 0;
}
.details-content table {
  display: block;
  overflow-x: auto;
}
.next-step { margin-bottom: 16px; border-left: 5px solid var(--primary); background: linear-gradient(90deg, var(--primary-soft), var(--surface) 52%); }
.next-step form { margin-top: 12px; }
.next-action-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.warning-box { margin-top: 12px; padding: 10px 12px; border-radius: 7px; background: var(--status-warning-bg); color: var(--status-warning-text); border: 1px solid rgba(224,165,58,.28); }
.owner-instruction-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(190, 103, 128, .28);
  border-left: 5px solid var(--status-danger-text);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(248, 229, 232, .82), rgba(255, 253, 248, .96) 52%);
  box-shadow: 0 8px 22px rgba(39,49,58,.08);
}
.owner-instruction-card h2 { margin: 2px 0 4px; font-size: 18px; }
.owner-instruction-card p { margin: 0 0 5px; color: var(--text); font-weight: 700; }
.owner-instruction-card small { color: var(--text-muted); }
.owner-instruction-kicker {
  color: var(--status-danger-text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.owner-note-inline {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(248, 229, 232, .64);
  color: var(--text);
}
.owner-note-inline strong { display: block; margin-bottom: 2px; font-size: 11px; color: var(--status-danger-text); text-transform: uppercase; letter-spacing: .06em; }
.owner-note-inline span { display: block; }
.owner-action-form { display: grid; gap: 6px; min-width: 220px; }
.owner-action-form input, .owner-action-form select { width: 100%; }
.support-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.support-rule {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 8px 20px rgba(39,49,58,.06);
}
.support-rule strong { color: var(--text); }
.support-rule span { color: var(--text-muted); }
.support-section { margin-bottom: 16px; }
.support-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.support-section-head h2 { margin: 0; }
.support-section-head p { max-width: 640px; margin: 0; color: var(--text-muted); }
.support-status-table td:nth-child(1) { min-width: 170px; }
.support-status-table td:nth-child(2) { color: var(--text-muted); }
.support-status-table td:nth-child(3) { color: var(--text); }
.support-status-table code { white-space: nowrap; color: var(--text-muted); }
.help-panel { background: var(--surface); }
.help-panel ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-muted); }
.help-text { margin: 8px 0 12px; color: var(--text-muted); }
summary { cursor: pointer; font-weight: 800; font-size: 18px; }
code { background: var(--surface-alt); border-radius: 4px; padding: 1px 5px; border: 1px solid var(--border); }
.upload-inline { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-bottom: 14px; }
.wizard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.wizard-step { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; gap: 8px; align-items: center; color: var(--text-muted); }
.wizard-step strong { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--status-neutral-bg); color: var(--text); }
.wizard-step.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary), 0 0 0 3px rgba(81,110,117,.10); color: var(--text); background: var(--surface); }
.wizard-step.done strong { background: var(--primary); color: #fff; }
.artifact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.artifact-card { display: grid; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--surface); color: var(--text); }
.artifact-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.artifact-card span { color: var(--text-muted); word-break: break-word; }
.badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--text-muted); font-size: 11px; font-weight: 800; }
.practice-badge {
  border: 1px solid rgba(119, 107, 46,.22);
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.practice-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 6px;
  color: var(--text-muted);
  font-weight: 750;
}
.advanced-actions { margin-top: 12px; }
.workflow-panel { background: var(--surface); }
.workflow-controls { display: grid; gap: 10px; }
.workflow-control { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.workflow-control label { font-weight: 650; }
.control-step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); font-weight: 800; color: var(--primary-hover); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: min(520px, calc(100vw - 40px)); padding: 14px 16px; border-radius: 8px; box-shadow: 0 12px 28px rgba(39,49,58,.18); font-weight: 750; animation: toast-in .18s ease-out; }
.toast-success { background: var(--status-success-bg); color: var(--status-success-text); border: 1px solid rgba(91,155,114,.30); }
.toast-error { background: var(--status-danger-bg); color: var(--status-danger-text); border: 1px solid rgba(217,108,124,.32); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.queue-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.summary-card { border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: grid; gap: 4px; }
.summary-card strong { font-size: 24px; line-height: 1; color: currentColor; }
.summary-card span { color: currentColor; opacity: .86; font-weight: 750; }
.sample-drawer {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 253, 248,.62);
}
.sample-drawer > summary {
  min-height: 38px;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}
.sample-drawer:not([open]) > :not(summary) { display: none; }
.sample-drawer .sample-actions { padding: 0 12px 12px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon value"
    "icon label";
  column-gap: 10px;
  align-items: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 253, 248,.97);
  box-shadow: 0 8px 20px rgba(39,49,58,.08);
}
.dashboard-stat .dashboard-stat-icon {
  grid-area: icon;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(72,104,122,.08);
}
.dashboard-stat .dashboard-stat-icon i {
  font-size: 16px;
  line-height: 1;
}
.dashboard-stat strong {
  grid-area: value;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}
.dashboard-stat small {
  grid-area: label;
  color: var(--text-muted);
  font-weight: 800;
}
.dashboard-stat.stat-action {
  background: linear-gradient(135deg, rgba(215, 231, 242,.56), rgba(255, 253, 248,.92));
  border-color: rgba(120, 183, 213,.30);
}
.dashboard-stat.practice-stat {
  background: linear-gradient(135deg, rgba(247, 238, 200,.62), rgba(255, 253, 248,.94));
  border-color: rgba(119, 107, 46,.24);
}
.dashboard-stat.practice-stat .dashboard-stat-icon {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}
.dashboard-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(72, 104, 122, .30);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(215, 231, 242,.76), rgba(255, 253, 248,1) 54%, rgba(241, 240, 234,.96)),
    var(--surface);
  box-shadow: 0 10px 26px rgba(39,49,58,.10);
}
.start-guide-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  border-color: rgba(184, 166, 74,.35);
  background: linear-gradient(135deg, rgba(247, 238, 200,.72), rgba(255,253,248,.96));
}
.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.dashboard-focus h2 {
  margin-bottom: 4px;
  font-size: 24px;
}
.dashboard-kicker {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248,.74);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.thread-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.thread-summary-strip span {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 253, 248,.80);
  color: var(--text-muted);
  font-weight: 800;
}
.thread-summary-strip strong {
  color: var(--text);
  font-size: 17px;
}
.thread-list {
  display: grid;
  gap: 8px;
}
.thread-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(190px, .78fr) minmax(110px, auto) auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-left-width: 5px;
  border-radius: 10px;
  background: rgba(255, 253, 248,.98);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(39,49,58,.06);
}
.thread-row:hover {
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(39,49,58,.08);
  transform: translateY(-1px);
}
.thread-main,
.thread-status,
.thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.thread-main strong {
  font-size: 16px;
}
.thread-main small,
.thread-status small {
  flex: 1 1 100%;
  color: var(--text-muted);
  font-weight: 650;
}
.thread-status {
  justify-content: flex-start;
}
.thread-meta {
  justify-content: flex-end;
}
.thread-title-link {
  color: var(--primary-hover);
  font-size: 16px;
  font-weight: 900;
}
.thread-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}
.thread-row-actions .compact-button {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: none;
}
.empty-state {
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(255, 253, 248,.62);
}
.timeline-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.timeline-item small { display: block; color: var(--text-muted); margin-bottom: 6px; }
.timeline-item strong {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 3px;
}
.timeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.button-secondary.copy-button {
  margin-top: 0;
  border-color: rgba(72, 104, 122,.32);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(72, 104, 122,.1);
}
.button-secondary.copy-button:hover {
  background: var(--primary-hover);
  color: #fff;
}
.copy-source { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.thread-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
}
.thread-meta-bar span,
.thread-meta-bar a {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248,.96);
  border: 1px solid rgba(95,103,108,.26);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
}
.thread-meta-bar b {
  color: var(--primary-hover);
  font-weight: 900;
}
.thread-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(215, 231, 242,.46), rgba(255, 253, 248,.94) 48%, rgba(232, 212, 218,.32)),
    var(--surface);
}
.thread-focus-copy h2 {
  margin: 8px 0 0;
  font-size: 24px;
}
.thread-signal-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.signal-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}
.muted-dot {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}
.thread-focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}
.thread-focus-actions form { margin: 0; }
.thread-focus-actions button,
.thread-focus-actions .button-link {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.thread-workspace {
  display: grid;
  grid-template-columns: minmax(280px, .88fr) minmax(360px, 1.12fr);
  gap: 16px;
  align-items: start;
}
.thread-card {
  min-height: 300px;
}
.thread-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.message-actions form { margin: 0; }
.thread-card textarea {
  min-height: 310px;
  line-height: 1.5;
  background: var(--surface);
}
.empty-draft {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 160px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(255, 253, 248,.58);
}
.empty-draft form { margin: 0; }
.revision-quick-tool {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.revision-quick-tool h2 {
  font-size: 17px;
}
.revision-quick-tool form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.revision-quick-tool textarea {
  min-height: 82px;
}
.thread-advanced {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 253, 248,.58);
}
.thread-advanced > summary {
  min-height: 44px;
  padding: 0 14px;
  color: var(--text-muted);
  font-size: 14px;
}
.thread-advanced:not([open]) > :not(summary) { display: none; }
.thread-advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 14px;
}
.thread-advanced h2 { font-size: 16px; }
.deal-panel,
.deal-signal-panel {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.deal-signal-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.deal-signal-card small {
  flex: 1 1 100%;
  color: var(--text-muted);
  text-align: right;
}
.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}
.manual-override {
  margin: -6px 0 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(255, 253, 248,.48);
}
.manual-override > summary {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.manual-override:not([open]) > :not(summary) { display: none; }
.manual-override .deal-form { padding: 0 12px 12px; }
.deal-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.copy-library-intro {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(215, 231, 242,.56), rgba(255, 253, 248,.96) 54%, rgba(241, 240, 234,.78)),
    var(--surface);
}
.copy-library-meta {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.copy-library-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-weight: 850;
}
.copy-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.copy-group-list {
  display: grid;
  gap: 14px;
}
.copy-group-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 253, 248,.92);
  box-shadow: 0 1px 0 rgba(39,49,58,.03);
}
.copy-group-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.copy-group-head h2 { margin-bottom: 4px; }
.copy-group-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--status-ai-text);
  font-size: 12px;
  font-weight: 850;
}
.copy-variant-list {
  display: grid;
  gap: 10px;
}
.copy-variant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.copy-variant textarea {
  min-height: 58px;
  resize: vertical;
  background: var(--surface);
  line-height: 1.45;
}
.no-copy-results { margin-top: 16px; }
.hard-triage-card {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  background: rgba(255, 253, 248, .9);
  box-shadow: 0 10px 32px rgba(39, 49, 58, .06);
}
.hard-triage-prompt {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: rgba(255, 253, 248, .72);
}
.hard-triage-prompt div {
  display: grid;
  gap: 2px;
}
.hard-triage-prompt span {
  color: var(--text-muted);
  font-size: 14px;
}
.hard-triage-blocking {
  border-left-color: var(--status-danger-dot);
  background: linear-gradient(135deg, rgba(247, 230, 230, .72), rgba(255, 253, 248, .94));
}
.hard-triage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.hard-triage-kicker {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hard-triage-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}
.hard-triage-reason {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 253, 248, .82);
  color: var(--status-danger-text);
  font-weight: 800;
}
.hard-triage-table {
  table-layout: fixed;
}
.hard-triage-table th:nth-child(1) { width: 22%; }
.hard-triage-table th:nth-child(2) { width: 14%; }
.hard-triage-table td {
  vertical-align: top;
}
.hard-triage-questions {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(237, 246, 252, .5);
}
.hard-triage-questions ul {
  margin: 0;
  padding-left: 20px;
}
.start-guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.start-progress-meter {
  display: grid;
  gap: 8px;
  color: var(--primary-hover);
  font-weight: 900;
}
.start-progress-meter strong { font-size: 28px; line-height: 1; }
.start-progress-meter span {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-alt);
}
.start-progress-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.start-guide-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.start-step-list {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 10px;
}
.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,253,248,.72);
}
.check-row input { width: auto; margin-top: 2px; }
.check-row strong,
.check-row small { display: block; }
.check-row small { color: var(--text-muted); font-weight: 650; }
.check-row.optional { background: rgba(234, 243, 248,.58); }
.start-guide-main { display: grid; gap: 16px; }
.start-step { display: grid; gap: 12px; }
.step-launch-copy {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.85;
}
.brand-text-link {
  display: inline-flex;
  position: relative;
  top: 5px;
  align-items: center;
  margin: 0 4px;
  padding: 5px 9px 6px;
  border: 1px solid rgba(72, 104, 122,.26);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(39,49,58,.1);
  text-decoration: none;
  vertical-align: baseline;
}
.brand-text-link::after {
  content: "Open";
  margin-left: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(38, 113, 166,.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.brand-text-link:hover {
  transform: translateY(-1px);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(39,49,58,.14);
}
.brand-text-link:focus-visible {
  outline: 3px solid rgba(38, 113, 166,.24);
  outline-offset: 3px;
}
.brand-logo-frame {
  display: inline-flex;
  width: 86px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 6px;
  background: #fff;
}
.brand-logo-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.upwork-current-logo {
  display: block;
  width: 82px;
  height: auto;
  fill: #14a800;
}
.brand-fiverr {
  border-color: rgba(29, 191, 115,.34);
  box-shadow: 0 6px 16px rgba(29, 191, 115,.14);
}
.brand-fiverr::after {
  background: rgba(29, 191, 115,.13);
  color: #137a4b;
}
.brand-upwork {
  border-color: rgba(20, 168, 0,.34);
  box-shadow: 0 6px 16px rgba(20, 168, 0,.14);
}
.brand-upwork::after {
  background: rgba(20, 168, 0,.13);
  color: #0f7d00;
}
.start-step ol {
  margin: 0;
  padding-left: 22px;
  color: var(--text-muted);
  font-weight: 650;
}
.compact-fields { gap: 12px; }
.template-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(234, 243, 248,.48);
}
.copy-source-visible {
  min-height: 160px;
  background: var(--surface-tint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.start-guide-part-two {
  border-color: rgba(38, 113, 166,.18);
  background: linear-gradient(180deg, rgba(237, 246, 252,.72), rgba(255,253,248,.96));
}
.start-guide-part-two h2 {
  margin-top: -4px;
}
.part-two-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 18px;
  align-items: center;
}
.part-two-illustration {
  width: 100%;
  max-width: 320px;
  justify-self: end;
  border: 1px solid rgba(120, 183, 213,.22);
  border-radius: 12px;
  background: rgba(255,253,248,.74);
  box-shadow: 0 12px 26px rgba(39,49,58,.10);
}
.part-two-lead {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}
.next-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.next-flow-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(72, 104, 122,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
}
.next-flow-item strong {
  color: var(--text);
  font-size: 14px;
}
.next-flow-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}
.part-two-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  color: var(--text);
  font-weight: 800;
}
.start-guide-part-two .sample-case {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(72, 104, 122,.2);
  border-radius: 8px;
  background: rgba(255,253,248,.84);
}
.start-guide-part-two .sample-case > strong {
  color: var(--text);
  font-size: 14px;
}
.start-guide-part-two .sample-customer-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.start-guide-part-two .sample-case-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
}
.start-guide-part-two .sample-case-grid span {
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.start-guide-part-two .sample-case-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}
.start-guide-part-two .practice-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}
.start-guide-part-two .practice-materials small {
  flex-basis: 100%;
  color: var(--text-muted);
  font-weight: 700;
}
.start-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
@media (max-width: 820px) {
  .grid-2, .toolbar, .form-grid, .queue-cards, .dashboard-grid, .dashboard-focus, .thread-row, .revision-quick-tool, .revision-quick-tool form, .upload-inline, .wizard, .artifact-cards, .workflow-control, .operator-focus, .thread-focus, .thread-workspace, .thread-advanced-grid, .mini-steps, .focus-artifacts, .delivery-check, .redo-board, .copy-filters, .copy-variant, .deal-panel, .deal-signal-panel, .deal-form, .owner-instruction-card, .support-overview, .start-guide-banner, .start-guide-hero, .start-guide-layout, .part-two-intro, .next-flow, .sample-case-grid { grid-template-columns: 1fr; }
  .part-two-illustration { justify-self: stretch; max-width: none; }
  .section-head { display: block; }
  .support-section-head { display: block; }
  .support-section-head p { margin-top: 4px; }
  .section-actions { justify-content: flex-start; margin-top: 10px; }
  .sticky-tip { align-items: flex-start; }
  .deal-signal-card { justify-content: flex-start; }
  .deal-signal-card small { text-align: left; }
  .copy-library-intro, .copy-group-head { display: block; }
  .operator-focus { text-align: left; padding: 18px; }
  .focus-progress { justify-items: start; }
  .start-step-list { position: static; }
  .focus-action { justify-self: stretch; max-width: none; }
  .thread-focus-actions { justify-content: flex-start; }
  .thread-card-head { display: block; }
  .message-actions { justify-content: flex-start; margin-top: 8px; }
  .thread-meta { justify-content: flex-start; }
  .dashboard-actions, .thread-row-actions { justify-content: flex-start; }
  .output-head { display: block; }
  .hard-triage-head, .hard-triage-prompt { display: block; }
  .hard-triage-prompt form { margin-top: 10px; }
  .redo-actions { justify-content: stretch; }
  .redo-actions form, .redo-actions button { width: 100%; }
  .topbar { height: auto; grid-template-columns: 1fr; align-items: flex-start; gap: 8px; padding: 14px 18px; }
  .topbar, .topbar nav { flex-wrap: wrap; }
  .reward-ticker { order: 3; width: fit-content; }
}
