/* Editorial Atelier — Sprint 2 product shell
   Progressive enhancement over the existing hardened runtime UI.
   No runtime or publication behaviour is changed here. */

:root {
  --product-surface: rgba(255, 253, 248, .92);
  --product-surface-strong: #fffdf8;
  --product-border: rgba(184, 137, 62, .24);
  --product-shadow: 0 22px 70px rgba(74, 48, 37, .09);
  --product-positive: #2f6b4f;
  --product-warning: #9a6a28;
  --product-danger: #9a4538;
}

.product-command-center {
  margin: 8px 0 22px;
  border: 1px solid var(--product-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 184, 120, .17), transparent 32rem),
    var(--product-surface);
  box-shadow: var(--product-shadow);
  overflow: hidden;
}

.product-command-head {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 28px;
  padding: clamp(22px, 3vw, 38px);
  align-items: start;
}

.product-command-kicker {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.product-command-title {
  max-width: 820px;
  margin: 0;
  color: var(--brown);
  font-family: Milano, Monza, sans-serif;
  font-size: clamp(31px, 4vw, 58px);
  line-height: .98;
  letter-spacing: -.035em;
}

.product-command-summary {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.product-health-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(47, 107, 79, .24);
  border-radius: 999px;
  background: rgba(47, 107, 79, .07);
  color: var(--product-positive);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.product-health-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.product-health-pill[data-state="warning"] {
  border-color: rgba(154, 106, 40, .28);
  background: rgba(154, 106, 40, .07);
  color: var(--product-warning);
}

.product-health-pill[data-state="danger"] {
  border-color: rgba(154, 69, 56, .28);
  background: rgba(154, 69, 56, .07);
  color: var(--product-danger);
}

.product-status-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr .8fr;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .28);
}

.product-status-card {
  min-width: 0;
  padding: 17px 20px 18px;
  border-right: 1px solid var(--line);
}

.product-status-card:last-child { border-right: 0; }
.product-status-card span,
.product-status-card small { display: block; }
.product-status-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.product-status-card strong {
  display: block;
  margin-top: 7px;
  color: var(--brown);
  font-size: 17px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.product-status-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.product-attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 clamp(22px, 3vw, 38px) clamp(22px, 3vw, 34px);
  padding: 13px 15px;
  border: 1px solid rgba(47, 107, 79, .2);
  border-radius: 13px;
  background: rgba(47, 107, 79, .055);
}
.product-attention[data-state="warning"] {
  border-color: rgba(154, 106, 40, .24);
  background: rgba(154, 106, 40, .06);
}
.product-attention[data-state="danger"] {
  border-color: rgba(154, 69, 56, .25);
  background: rgba(154, 69, 56, .065);
}
.product-attention-copy strong,
.product-attention-copy span { display: block; }
.product-attention-copy strong { color: var(--brown); font-size: 13px; }
.product-attention-copy span { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.product-attention button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--gold);
  border-radius: 9px;
  background: var(--paper);
  color: var(--brown);
  font-weight: 650;
}

.product-primary-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.product-primary-actions button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 650;
}
.product-primary-actions .product-primary {
  border: 1px solid var(--brown);
  background: var(--brown);
  color: #fff;
}
.product-primary-actions .product-secondary {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--brown);
}

/* Existing hero becomes a secondary creation studio. */
.intro.product-secondary-studio {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 0 20px;
}
.intro.product-secondary-studio > div:first-child { display: none; }
.intro.product-secondary-studio .topic-form {
  max-width: none;
  box-shadow: none;
}
.intro.product-secondary-studio[data-collapsed="true"] .topic-form { display: none; }

.product-studio-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--product-surface-strong);
  color: var(--brown);
  text-align: left;
  font-weight: 700;
}
.product-studio-toggle small {
  color: var(--muted);
  font-weight: 500;
}

/* The legacy metric strip is superseded by the decision-first command strip. */
.metrics { display: none !important; }

.control-center { margin-top: 0; }
.control-heading { align-items: start; }
.control-heading > div:first-child h2 { font-size: clamp(24px, 2.4vw, 34px); }

/* Cadence is a configuration surface, not the page hero. */
.automation-controls { border-radius: 14px; }

/* Technical worker details are progressively disclosed. */
.product-system-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .7);
  overflow: hidden;
}
.product-system-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  color: var(--brown);
  font-weight: 700;
}
.product-system-details > summary::-webkit-details-marker { display: none; }
.product-system-details > summary::after { content: "+"; color: var(--gold-dark); font-size: 20px; }
.product-system-details[open] > summary::after { content: "−"; }
.product-system-details > .worker-panel { margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }

/* Learning should describe evidence coverage, not pseudo-confidence. */
.learning-meter small { font-size: 0; }
.learning-meter small::after { content: "history coverage"; font-size: 10px; }

.article-console { margin-top: 18px; }
.article-list-wrap { min-width: 0; }
.article-list { max-height: 620px; }

@media (max-width: 980px) {
  .product-command-head { grid-template-columns: 1fr; }
  .product-health-pill { justify-self: start; }
  .product-status-grid { grid-template-columns: 1fr 1fr; }
  .product-status-card:nth-child(2) { border-right: 0; }
  .product-status-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .product-command-center { border-radius: 18px; }
  .product-command-head { padding: 20px 16px; gap: 20px; }
  .product-command-title { font-size: clamp(30px, 10.5vw, 42px); }
  .product-command-summary { font-size: 14px; }
  .product-status-grid { grid-template-columns: 1fr; }
  .product-status-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .product-status-card:last-child { border-bottom: 0; }
  .product-attention { margin: 0 16px 18px; align-items: flex-start; flex-direction: column; }
  .product-attention button { width: 100%; }
  .product-primary-actions { display: grid; grid-template-columns: 1fr; }
  .product-primary-actions button { width: 100%; }
  .product-studio-toggle { align-items: flex-start; flex-direction: column; justify-content: center; padding: 12px 14px; }
}
