/*
 * ya-register.css — the register entry at the foot of a teacher's profile.
 * v1.2.0, 21 September 2026. Companion: ya-register.md beside this file.
 *
 * Scope: .ya-register and its own elements alone. The block is white on the
 * profile's ground, ruled like a ledger: one plum rule at the head, hairlines
 * between lines, and Work Sans throughout. Labels
 * are plum-deep so they pass at their size on white (9.4:1).
 *
 * Each credential is one line, a native <details> whose <summary> carries the
 * kind, the name and the grant date, with a chevron at the right that turns
 * when the line is open. The open line shows the standard, its version and the
 * competencies in the same label-and-value grid as the entry rows beneath.
 */

.ya-register {
  --ya-reg-plum:      #6C4B61;
  --ya-reg-plum-deep: #5A3E51;
  --ya-reg-cream:     #F6F5F4;
  --ya-reg-ink:       #1E2132;
  --ya-reg-line:      rgba(108, 75, 97, 0.22);
  --ya-reg-ground:    #FFFFFF;
  --ya-reg-body:      "Work Sans", "Worksans", system-ui, sans-serif;
  --ya-reg-col:       168px;
  --ya-reg-gap:       24px;

  box-sizing: border-box;
  background: var(--ya-reg-ground);
  color: var(--ya-reg-ink);
  border: 1px solid var(--ya-reg-line);
  border-top: 3px solid var(--ya-reg-plum);
  border-radius: 0 0 4px 4px;
  padding: 0 30px 32px;
  margin: 0 0 24px;
  font-family: var(--ya-reg-body);
  font-size: 1rem;
  line-height: 1.5;
}
.ya-register *,
.ya-register *::before,
.ya-register *::after { box-sizing: inherit; }

/* ------------------------------------------------------------------- head */

/* The heading carries the theme's own panel-header markup, so it takes the
 * theme's size, weight and colour. What it does not inherit is the family,
 * which the theme sets inside .group-separator-block alone and which would
 * otherwise fall to this block's --ya-reg-body, and the inset, which the
 * block's own side padding decides. Both are matched to Teacher Information
 * and Biography here (Josh, 21 September 2026: the heading "in line with the
 * other headings on the page"). Theme values read from the live page's
 * computed styles, 21 September 2026: family Worksans, side inset 30px,
 * header padding 20px 0 with a 20px bottom margin and a hairline rule.
 */
.ya-register .entry-header .bb-profile-title { font-family: Worksans, sans-serif; }

.ya-register__meta {
  margin: 0 0 6px;
  font-size: 0.875rem;
  color: var(--ya-reg-plum-deep);
}

/* ------------------------------------------------------------ credentials */

.ya-register__list { margin: 0; padding: 0; }
.ya-register__item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ya-reg-line);
}
.ya-register__item:last-child { border-bottom: 0; }
.ya-register__summary {
  display: grid;
  grid-template-columns: var(--ya-reg-col) minmax(0, 1fr) 20px;
  column-gap: var(--ya-reg-gap);
  align-items: baseline;
  margin: 0;
  padding: 14px 0;
  list-style: none;
  cursor: pointer;
  color: var(--ya-reg-ink);
}
.ya-register__summary::-webkit-details-marker { display: none; }
.ya-register__summary::marker { content: ""; }
.ya-register__item--flat .ya-register__summary { cursor: default; }
.ya-register__summary:focus { outline: none; }
.ya-register__summary:focus-visible {
  outline: 2px solid var(--ya-reg-plum);
  outline-offset: 2px;
  border-radius: 2px;
}
.ya-register__kind {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ya-reg-plum-deep);
}
.ya-register__credential {
  min-width: 0;
  font-size: 1.125rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ya-register__granted { font-weight: 400; }

/* The chevron: a bordered square turned 45 degrees, pointing down when the
   line is closed and up when it is open. */
.ya-register__mark {
  position: relative;
  align-self: center;
  width: 20px;
  height: 20px;
}
.ya-register__mark::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ya-reg-plum);
  border-bottom: 2px solid var(--ya-reg-plum);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.ya-register__item[open] > .ya-register__summary .ya-register__mark::before {
  top: 8px;
  transform: rotate(225deg);
}
.ya-register__summary:hover .ya-register__mark::before,
.ya-register__summary:focus-visible .ya-register__mark::before { border-color: var(--ya-reg-plum-deep); }

.ya-register__detail {
  margin: 0;
  padding: 0 0 8px calc(var(--ya-reg-col) + var(--ya-reg-gap));
}
.ya-register__detail .ya-register__row { padding: 6px 0 10px; border-bottom: 0; }

/* ------------------------------------------------------------------- rows */

.ya-register__group {
  margin: 0;
  padding: 0;
}
.ya-register__group--entry { margin-top: 10px; border-top: 2px solid var(--ya-reg-line); }
.ya-register__row {
  display: grid;
  grid-template-columns: var(--ya-reg-col) minmax(0, 1fr);
  column-gap: var(--ya-reg-gap);
  row-gap: 4px;
  align-items: baseline;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--ya-reg-line);
}
.ya-register__group .ya-register__row:last-child { border-bottom: 0; }
.ya-register__label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ya-reg-plum-deep);
}
.ya-register__value {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ya-register__value a {
  color: var(--ya-reg-plum);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ya-register__value a:hover,
.ya-register__value a:focus-visible { color: var(--ya-reg-plum-deep); }
.ya-register__warrant { max-width: 72ch; }

/* ------------------------------------------------------------------ paste */

.ya-register__paste {
  display: flex;
  align-items: flex-start;
  gap: 16px 20px;
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--ya-reg-cream);
  border-radius: 4px;
}
.ya-register__paste-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}
/* The URL breaks only at the <wbr> after each slash, never mid-word. */
.ya-register__paste-url {
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}
.ya-register__copy {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 20px;
  font-family: var(--ya-reg-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ya-reg-ground);
  background: var(--ya-reg-plum);
  border: 1px solid var(--ya-reg-plum);
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
}
.ya-register__copy:hover,
.ya-register__copy:focus-visible {
  background: var(--ya-reg-plum-deep);
  border-color: var(--ya-reg-plum-deep);
  color: var(--ya-reg-ground);
}
.ya-register__copy.is-copied {
  background: var(--ya-reg-ground);
  color: var(--ya-reg-plum-deep);
  border-color: var(--ya-reg-plum-deep);
}

/* ------------------------------------------------------------------ phone */

@media (max-width: 639px) {
  .ya-register { padding: 0 30px 20px; }
  .ya-register__summary {
    grid-template-columns: minmax(0, 1fr) 20px;
    grid-template-areas: "kind mark" "name mark";
    row-gap: 2px;
    padding: 12px 0;
  }
  .ya-register__kind { grid-area: kind; }
  .ya-register__credential { grid-area: name; }
  .ya-register__mark { grid-area: mark; }
  .ya-register__detail { padding-left: 0; }
  .ya-register__row { grid-template-columns: minmax(0, 1fr); row-gap: 2px; padding: 10px 0; }
  .ya-register__paste { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .ya-register__copy { align-self: flex-start; }
}
