/* ---------------------------------------------------------------------------
 * article-detail.css — page-specific styles for the Article detail template
 * ---------------------------------------------------------------------------
 * Extracted from the former inline <style> block in templates/article-detail.ts
 * (App-Building Bible principle 5: no inline <style>). Loaded via the layout's
 * headExtra <link href=asset("article-detail.css")>.
 *
 * The original CSS interpolated `brand.*` design tokens from layout.ts. Those
 * are static build-time constants, so they are inlined verbatim here to keep
 * the visual output byte-identical:
 *   primary #4951EF · primaryLight #EEEFFE · bg #F9FAFB · surface #FFFFFF
 *   ink #09090B · muted #71717A · border #E4E4E7 · borderLight #F4F4F5
 *   radiusSmall 12px · radiusInput 10px · radiusChip 8px
 *   font 'Inter', system-ui, -apple-system, sans-serif
 *   fontMono 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace
 * ------------------------------------------------------------------------- */

/* Action bar */
.ad-action-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid #F4F4F5;
  background: #F9FAFB;
}
.ad-action-divider { width: 1px; height: 20px; background: #E4E4E7; }

/* Header */
.ad-header { padding: 16px 24px 12px; }
.ad-title-editable {
  font-size: 24px; font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2;
  margin-bottom: 8px; color: #09090B;
  border: 2px solid transparent;
  padding: 4px 8px; border-radius: 10px;
  background: transparent; width: 100%;
  transition: border-color .15s, background .15s;
  display: block;
}
.ad-title-editable:hover { border-color: #F4F4F5; background: #F9FAFB; }
.ad-title-editable:focus {
  outline: none; border-color: #4951EF;
  background: #FFFFFF; box-shadow: 0 0 0 2px #EEEFFE;
}
.ad-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ad-slug {
  font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace; font-size: 12px;
  color: #71717A; background: #F9FAFB;
  padding: 2px 8px; border-radius: 8px;
}

/* Timeline */
.ad-timeline {
  display: flex; align-items: flex-start; gap: 0;
  padding: 16px 24px;
  overflow-x: auto;
  background: #F9FAFB;
  border-bottom: 1px solid #E4E4E7;
}
.ad-timeline__step {
  display: flex; flex-direction: column; align-items: center;
  position: relative; min-width: 56px; flex: 1;
}
.ad-timeline__node {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
  border: 2px solid #E4E4E7; background: #FFFFFF;
  color: #71717A; position: relative; z-index: 2;
}
.ad-timeline__node--done { background: #059669; border-color: #059669; color: #fff; }
.ad-timeline__node--active {
  background: #4951EF; border-color: #4951EF; color: #fff;
  box-shadow: 0 0 0 3px #EEEFFE;
}
.ad-timeline__conn {
  position: absolute; top: 11px;
  left: calc(50% + 11px); right: calc(-50% + 11px);
  height: 2px; background: #E4E4E7; z-index: 1;
}
.ad-timeline__conn--done { background: #059669; }
.ad-timeline__lbl {
  font-size: 10px; font-weight: 500; color: #71717A;
  margin-top: 4px; text-align: center; white-space: nowrap;
}

/* Tabs */
.ad-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid #E4E4E7;
  padding: 0 24px;
}
.ad-tab {
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  color: #71717A; border: none; background: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 120ms ease;
  text-decoration: none;
}
.ad-tab:hover { color: #09090B; }
.ad-tab.active { color: #4951EF; border-bottom-color: #4951EF; }

/* Overview grid */
.ad-overview {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 0;
}
.ad-overview__main { padding: 16px 24px; }
.ad-overview__side {
  border-left: 1px solid #E4E4E7;
  background: #F9FAFB;
}
@media (max-width: 960px) {
  .ad-overview { grid-template-columns: 1fr; }
  .ad-overview__side { border-left: none; border-top: 1px solid #E4E4E7; }
}

/* Fields */
.ad-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.ad-field { display: flex; flex-direction: column; gap: 2px; }
.ad-field__label {
  font-size: 10px; font-weight: 600; color: #71717A;
  text-transform: uppercase; letter-spacing: .05em;
}
.ad-field__value { font-size: 13px; font-weight: 500; color: #09090B; }

.ad-section-border {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid #F4F4F5;
}

/* Dates grid */
.ad-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Sidebar sections */
.ad-sidebar-section { padding: 12px 16px; }
.ad-sidebar-section + .ad-sidebar-section { border-top: 1px solid #F4F4F5; }
.ad-sidebar-title {
  font-size: 10px; font-weight: 600; color: #71717A;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
}

/* Approval gates */
.ad-gate { display: flex; gap: 8px; padding: 8px 0; }
.ad-gate + .ad-gate { border-top: 1px solid #F4F4F5; }
.ad-gate__icon { width: 20px; text-align: center; flex-shrink: 0; padding-top: 1px; }
.ad-gate__header { display: flex; align-items: center; gap: 8px; }

/* Brief status bar */
.ad-brief-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #F9FAFB;
  border-radius: 8px; border: 1px solid #F4F4F5;
}

/* Draft layout */
.ad-draft-layout {
  display: grid; grid-template-columns: 1fr 240px;
  gap: 0; min-height: 500px;
}
.ad-draft-editor {
  padding: 16px 24px;
  border-right: 1px solid #E4E4E7;
}
.ad-draft-sidebar { background: #F9FAFB; }

/* Review layout */
.ad-review-layout { display: flex; min-height: 400px; }

/* Empty tab */
.ad-empty-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 24px; text-align: center;
}

/* Next action */
.ad-next-action {
  margin-top: 16px; padding: 12px 16px;
  background: #EEEFFE; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Toast */
.ad-toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 10px 18px; border-radius: 12px;
  font-size: 13px; font-weight: 500; z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transform: translateY(100px); opacity: 0; transition: all .3s ease;
}
.ad-toast.visible { transform: translateY(0); opacity: 1; }
.ad-toast--success { background: #059669; color: #fff; }
.ad-toast--error { background: #DC2626; color: #fff; }
.ad-toast--info { background: #4951EF; color: #fff; }

/* ── style= migration: page-specific static chrome ───────────────────────── */
/* Draft body rendered content box */
.ad-draft-body {
  background: #F9FAFB; border: 1px solid #E4E4E7; border-radius: 10px;
  padding: 16px; min-height: 400px; font-size: 14px; line-height: 1.7; color: #09090B;
}
/* Approval decision form panel */
.ad-approval-form {
  background: #F9FAFB; border: 1px solid #E4E4E7; border-radius: 12px;
  padding: 16px; margin-bottom: 16px;
}
/* Text/select inputs inside the approval form (34px controls) */
.ad-form-control {
  width: 100%; height: 34px; border: 1px solid #E4E4E7;
  border-radius: 10px; padding: 0 8px; font-size: 13px;
}
/* Approve / reject buttons with success/error outline */
.ad-btn-approve { color: #059669; border: 1px solid #059669; height: 34px; }
.ad-btn-reject  { color: #DC2626; border: 1px solid #DC2626; height: 34px; }

/* Brief outline / key-points code block (static chrome; text utils applied inline) */
.ad-code-block { background: #F9FAFB; padding: 12px; border-radius: 12px; }
