/* Tech Keyperson: article participants and twenty questions.
 * New components only; article content, advertisements and the sidebar keep
 * their existing styles. The colour fallbacks also work in wp-admin. */

.tkpd-people,
.tkpd-twenty,
.tkpd-editor {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.tkpd-people *,
.tkpd-twenty *,
.tkpd-editor * {
  box-sizing: border-box;
}

.tkpd-people [hidden],
.tkpd-twenty [hidden],
.tkpd-editor [hidden] {
  display: none !important;
}

.tkpd-people {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 28px 0 32px;
  color: var(--tkp-ink, #182c29);
}

.tkpd-people .tkpd-person {
  min-width: 0;
  margin: 0;
  padding: 24px;
  background: var(--tkp-soft, #f2f5f2);
  border: 1px solid var(--tkp-line, #dce4de);
  border-left: 3px solid var(--tkp-accent, #176858);
  border-radius: 4px;
}

.tkpd-people .tkpd-person--interviewer {
  background: #f8faf8;
  border-left-color: #9cbda2;
}

.tkpd-person .tkpd-person-label,
.tkpd-twenty .tkpd-eyebrow {
  margin: 0 0 16px;
  color: var(--tkp-accent, #176858);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .1em;
}

.tkpd-person-label > span {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0;
}

.tkpd-person-label > span + span { margin-left: 10px; }

.tkpd-person .tkpd-person-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.tkpd-person .tkpd-person-photo {
  display: block;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
  background: #e8eee9;
}

.tkpd-person-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

.tkpd-person .tkpd-person-copy {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tkpd-person .tkpd-person-name {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tkp-ink, #182c29);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.5;
}

.tkpd-person .tkpd-person-role {
  margin: 6px 0 0;
  color: var(--tkp-muted, #5c6b67);
  font-size: 13px;
  line-height: 1.8;
}

.tkpd-person .tkpd-person-bio {
  margin-top: 14px;
  color: #455951;
  font-size: 14px;
  line-height: 2;
}

.tkpd-person-bio > :first-child { margin-top: 0; }
.tkpd-person-bio > :last-child { margin-bottom: 0; }
.tkpd-person-bio p { margin: 0 0 1em; }
.tkpd-person-bio ul,
.tkpd-person-bio ol { margin: 12px 0; padding-left: 1.5em; }
.tkpd-person-bio ul > li { list-style: disc; }
.tkpd-person-bio ol > li { list-style: decimal; }
.tkpd-person-bio img { max-width: 100%; height: auto; }

.tkpd-person .tkpd-person-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 0;
  color: var(--tkp-accent, #176858);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.tkpd-person a:focus-visible,
.tkpd-twenty a:focus-visible {
  outline: 2px solid var(--tkp-accent, #176858);
  outline-offset: 4px;
}

.tkpd-twenty {
  margin: 56px 0 40px;
  padding-top: 28px;
  border-top: 2px solid var(--tkp-accent, #176858);
  color: var(--tkp-ink, #182c29);
  scroll-margin-top: 130px;
  overflow-wrap: anywhere;
}

.tkpd-twenty .tkpd-twenty-header {
  position: relative;
  min-width: 0;
  margin-bottom: 24px;
}

.tkpd-twenty .tkpd-twenty-header h2 {
  margin: 8px 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tkp-ink, #182c29);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .02em;
}

.tkpd-twenty-header h2 > span { display: inline-block; }
.tkpd-twenty .tkpd-eyebrow { display: block; margin-bottom: 8px; }
.tkpd-twenty .tkpd-twenty-intro {
  margin: 0;
  color: var(--tkp-muted, #5c6b67);
  font-size: 13px;
  line-height: 1.8;
}

.tkpd-twenty .tkpd-twenty-number {
  display: none;
}

.tkpd-twenty .tkpd-twenty-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--tkp-line, #dce4de);
}

.tkpd-twenty .tkpd-twenty-row {
  display: grid;
  grid-template-columns: minmax(160px, 30%) minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 23px 0;
  border-bottom: 1px solid var(--tkp-line, #dce4de);
}

.tkpd-twenty-row > dt {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.9;
}

.tkpd-twenty .tkpd-question-number {
  color: var(--tkp-accent, #176858);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 2.05;
  font-variant-numeric: tabular-nums;
}

.tkpd-twenty .tkpd-question-text { min-width: 0; }
.tkpd-twenty .tkpd-answer {
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
}

/* Meta boxes and the dedicated article editor share the same form controls. */
.tkpd-editor {
  margin: 12px 0;
  color: #1d2327;
  font-size: 14px;
  line-height: 1.65;
}

.tkpd-editor .description { line-height: 1.7; }
.tkpd-editor label { font-weight: 600; }
.tkpd-editor input[type="text"],
.tkpd-editor input[type="url"],
.tkpd-editor input[type="search"],
.tkpd-editor select,
.tkpd-editor textarea {
  max-width: 100%;
  min-height: 36px;
  font: inherit;
}

.tkpd-editor [data-person-field]:not([type="hidden"]),
.tkpd-editor [data-question-value],
.tkpd-editor [data-twenty-answer] {
  display: block;
  width: 100%;
  margin: 6px 0;
}

.tkpd-editor textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.8;
}

.tkpd-editor [data-person-field="mode"] { width: auto; }
.tkpd-editor [data-person-preview] {
  display: block;
  width: 96px;
  height: 96px;
  margin: 10px 0;
  object-fit: cover;
  border: 1px solid #dce4de;
  border-radius: 4px;
}

.tkpd-editor [data-person-empty] {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 10px 0;
  color: #646970;
  background: #f2f5f2;
  border: 1px dashed #a9b8ae;
  border-radius: 4px;
}

.tkpd-editor [data-person-action],
.tkpd-editor [data-profile-find],
.tkpd-editor [data-profile-apply],
.tkpd-editor [data-twenty-refresh] {
  min-height: 36px;
  margin: 4px 6px 4px 0;
  white-space: normal;
}

.tkpd-editor [data-profile-search] {
  width: min(100%, 420px);
  margin: 4px 6px 4px 0;
}

.tkpd-editor [data-profile-results] {
  display: block;
  width: min(100%, 680px);
  margin: 8px 0;
}

.tkpd-editor [data-person-status],
.tkpd-editor [data-profile-status],
.tkpd-editor [data-twenty-status] {
  min-height: 1.7em;
  margin: 8px 0;
  color: #176858;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.tkpd-editor [data-twenty-progress] {
  display: inline-block;
  padding: 4px 10px;
  color: #176858;
  background: #f2f5f2;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tkpd-editor [data-tkpd-twenty-editor] > ol,
.tkpd-editor[data-tkpd-twenty-editor] > ol {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tkpd-editor [data-question-key] {
  min-width: 0;
  margin: 0;
  padding: 20px 0;
  list-style: none;
  border-top: 1px solid #dce4de;
}

.tkpd-editor [data-question-value] {
  font-weight: 600;
}

.tkpd-editor [data-twenty-answer] {
  margin-top: 8px;
}

@media screen and (max-width: 600px) {
  .tkpd-people { gap: 12px; margin: 24px 0 28px; }
  .tkpd-people .tkpd-person { padding: 18px 16px; }
  .tkpd-person .tkpd-person-label { margin-bottom: 14px; }
  .tkpd-person .tkpd-person-content { gap: 14px; }
  .tkpd-person .tkpd-person-photo { flex-basis: 56px; width: 56px; height: 56px; }
  .tkpd-person .tkpd-person-name { font-size: 21px; }
  .tkpd-person .tkpd-person-role { font-size: 12px; }
  .tkpd-person .tkpd-person-bio { font-size: 13px; line-height: 1.95; }
  .tkpd-twenty { margin-top: 40px; padding-top: 24px; scroll-margin-top: 110px; }
  .tkpd-twenty .tkpd-twenty-header { margin-bottom: 20px; }
  .tkpd-twenty .tkpd-twenty-header h2 { font-size: 25px; }
  .tkpd-twenty .tkpd-twenty-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px 0; }
  .tkpd-twenty-row > dt { font-size: 14px; }
  .tkpd-twenty .tkpd-answer { padding-left: 36px; font-size: 15px; }
  .tkpd-editor [data-profile-search],
  .tkpd-editor [data-profile-results] { width: 100%; }
  .tkpd-editor input[type="text"],
  .tkpd-editor input[type="url"],
  .tkpd-editor input[type="search"],
  .tkpd-editor select,
  .tkpd-editor textarea { font-size: 16px; }
  .tkpd-editor [data-person-action],
  .tkpd-editor [data-profile-find],
  .tkpd-editor [data-profile-apply],
  .tkpd-editor [data-twenty-refresh] { min-height: 44px; }
}

@media print {
  .tkpd-person,
  .tkpd-twenty-row { break-inside: avoid; }
  .tkpd-people .tkpd-person { background: none; }
  .tkpd-twenty .tkpd-twenty-row { grid-template-columns: minmax(140px, 30%) minmax(0, 1fr); }
}
