/* Pilot feedback tracker. */

@layer components {

/* The .pilot content column takes the --content-narrow tier
   (spacing-foundation D2). Was 56rem (896px) -> 768px — a modest
   narrowing to the editorial tier. Pilot is a multi-panel content
   surface (a form panel plus issue / report lists), not a narrow form,
   so it does not take --content-form. */
.pilot {
  max-width: var(--content-narrow);
  margin: var(--space-section) auto var(--space-8);
  display: grid;
  gap: var(--space-5);
}

.pilot__header {
  display: grid;
  gap: var(--space-2);
}

.pilot__heading {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.pilot__panel {
  padding: var(--space-5);
  background: var(--md-surface-container-low);
  border: 1px solid var(--md-border-muted);
  border-radius: var(--radius-md);
}

.pilot__subheading {
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.pilot__form {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.pilot__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--md-on-surface);
}

.pilot__input,
.pilot__textarea {
  width: 100%;
  border: 1px solid var(--md-border);
  border-radius: var(--radius-md);
  background: var(--md-surface);
  color: var(--md-on-surface);
  font: inherit;
}

.pilot__input {
  /* Form input paired with .pilot__submit — shares the --control-h height
     (spacing-foundation D3). Was 44px, identical to the token — no-op. */
  min-height: var(--control-h);
  padding: 0 var(--space-3);
}

.pilot__textarea {
  resize: vertical;
  min-height: 8rem;
  padding: var(--space-3);
}

.pilot__input:focus,
.pilot__textarea:focus {
  outline: none;
  border-color: var(--md-primary);
  box-shadow: var(--focus-ring);
}

.pilot__submit {
  justify-self: start;
  min-height: var(--control-h);
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--md-primary);
  color: var(--md-on-primary);
  font-weight: 700;
  cursor: pointer;
}

.pilot__error {
  margin-top: var(--space-3);
  color: var(--md-error);
  font-weight: 700;
}

.pilot__list {
  margin: var(--space-4) 0 0;
  padding-left: var(--space-5);
  color: var(--md-on-surface-variant);
}

.pilot__issues {
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.pilot__issue {
  list-style: none;
  padding: var(--space-4);
  background: var(--md-surface);
  border: 1px solid var(--md-border-muted);
  border-radius: var(--radius-md);
}

.pilot__issue-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
}

.pilot__issue-title {
  min-width: 0;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.pilot__status {
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.pilot__issue-body,
.pilot__meta,
.pilot__empty {
  margin-top: var(--space-2);
  color: var(--md-on-surface-variant);
}

.pilot__issue-body {
  overflow-wrap: anywhere;
}

.pilot__meta {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .pilot__panel {
    padding: var(--space-4);
  }

  .pilot__issue-head {
    flex-direction: column;
  }
}

}
