/* ═══════════════════════════════════════════════════════════════
   briefs.css — Display heading + lede, brief (text card), form wrappers, profile form, page-head rows
   Split out of cards-panels.css; load order: briefs → buttons-sections → cards-panels.
   ═══════════════════════════════════════════════════════════════ */

/* Heading helpers */
.h-display {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fz-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text);
}
.h-display em { font-style: normal; color: var(--accent); }

.h-kicker {
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 500;
  letter-spacing: var(--ls-mono-strong);
  text-transform: uppercase;
  color: var(--accent);
}
/* ─── §3 Display heading + lede ─────────────────────────────── */
h1.display {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin: 0;
  color: var(--text);
  max-width: 18ch;
}
h1.display em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
}

.lede {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 19px;
  line-height: var(--lh-prose);
  color: var(--text-2);
  max-width: 56ch;
  margin: var(--space-8) 0 var(--space-12);
}
.lede a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ─── §10 Brief (text card) ──────────────────────────────────── */
.brief {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 26px 28px 18px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
}
/* Shared form wrapper — keeps individual form cards readable (~880px) while
   the surrounding header/grid spans the full content area. */
.page-form {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
/* "Wide" .brief variant — fills the body-wrap width instead of clamping at
   880px. Used for settings/admin pages where the form sits under a
   full-width tab header and should align with those tabs. */
.brief--wide {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  background: var(--paper);
}
/* Two-column field grid. Each .field column sits in its own track so the
   widened brief doesn't end up with stretched-out single-column inputs. */
.form-grid {
  display: grid;
  gap: var(--space-5) var(--space-6);
}
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid__span { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .form-grid--2, .form-grid--3 { grid-template-columns: 1fr; }
}

/* Profile form — two stacked row-blocks (personal info + password) with a
   shared white card surface and a single Save button at the bottom. */
.profile-form { display: flex; flex-direction: column; gap: var(--space-6); }
.profile-card { padding: var(--space-10) var(--space-10); }
.profile-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--space-5);
}
.profile-card__hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 0 var(--space-5);
}
.profile-card__body--personal {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: var(--space-10);
  align-items: start;
}
.profile-avatar { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.profile-avatar__pic { width: 96px; height: 96px; font-size: 36px; }
.profile-avatar__controls { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); width: 100%; }
.profile-avatar__upload { cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); }
.profile-avatar__remove { font-size: 12px; color: var(--ink-3); padding: 0; background: transparent; border: 0; cursor: pointer; }
.profile-avatar__remove:hover { color: var(--accent); }
.profile-avatar__hint { font-size: 11px; text-align: center; margin: 0; color: var(--ink-3); }
.profile-form__actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.profile-form__note { margin: 0; font-size: 12px; color: var(--ink-3); }
/* Stacked cards / a card after the form: .brief has no margin of its own, so
   siblings outside a flex `gap` container (profile, API tokens) glued
   together. Same step as the .profile-form gap. */
.brief--wide + .brief--wide,
.profile-form + .brief--wide { margin-top: var(--space-6); }
@media (max-width: 720px) {
  .profile-card__body--personal { grid-template-columns: 1fr; }
}
/* Two-column grid for stand-alone "settings"-style cards (profile, etc.)
   that should span the full width of the content area without bunching
   into a narrow central column. Cards drop to a single column on small
   viewports. */
.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: start;
  width: 100%;
}
.page-grid--full > * { grid-column: 1 / -1; }
@media (max-width: 880px) {
  .page-grid { grid-template-columns: 1fr; }
}

/* Header row that sits flush with the body-wrap edges: tabs left, action
   button right, with the project-tabs underline rule extending the full
   width of the row. */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-8);
}
.page-head .project-tabs { border-bottom: 0; margin-bottom: 0; flex: 1; }
.page-head__btn {
  align-self: center;
  margin-bottom: var(--space-3);
  white-space: nowrap;
}
/* Modifier for page-head buttons that are <a> tags rendered with a
   leading icon — strips the underline and applies inline-flex spacing
   so the icon + label center cleanly (used by /admin/settings →
   /admin/compass link). */
.page-head__btn--icon-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
/* .brief corner-tag removed — was a literal "Otack Manager" string that
   ignored white-label. If we ever want a brand chip back, render it from
   PHP using app_name() rather than baking it into a pseudo-element. */
.brief-meta {
  margin: var(--space-6) 0 var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fz-micro);
  letter-spacing: var(--ls-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.brief-meta .right { color: var(--text-2); }
.brief textarea {
  width: 100%;
  min-height: 140px;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1.45;
  color: var(--text);
  padding: 6px 0 12px;
}
.brief textarea::placeholder { color: var(--text-muted); font-weight: 400; }
.brief-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}
