/* ============================================================
   Topp 20 HR (hr_topp app) — list + person page.
   Duplicated from skribenter2026.css's proven primitives (hero band,
   portrait, iconlink, section-title overrides) under a .topp- prefix,
   on purpose — see claude-design-hr-top plan: shared-partial extraction
   deferred until a third page needs the same pieces.
   ============================================================ */

.topp-list,
.topp-detail {
  --tp-paper: #ffffff;
  --tp-sand: #f5f3f2;
  --tp-mint: #e7f2ea;
  --tp-ink: #000000;
  --tp-graphite: #54646a;
  --tp-green-brand: #49b170;
  --tp-green-link: #1e7a48;
  --tp-green-deep: #0f5132;
  --tp-border-card: rgba(28, 58, 64, 0.12);
  --tp-border-grid: rgba(0, 0, 0, 0.1);
  --tp-rule: rgba(0, 0, 0, 0.08);
  --tp-radius: 12px;
  --tp-radius-avatar: 10px;
  --tp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hero runs full-bleed; the rest of the page stays inside main.container. */
body.page-home main.container:has(.topp-hero) {
  padding-top: 0;
}

/* ---------- Hero band (sand + satin texture — same asset as Skribenter) ---------- */
.topp-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-color: var(--tp-sand);
  background-image: url("../media/images/skribenter-hero-satin.jpg");
  background-size: cover;
  background-position: center 42%;
  border-bottom: 1px solid var(--tp-rule);
}

.topp-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.topp-hero__crumb {
  padding: 22px 0 36px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tp-graphite);
}

.topp-hero__crumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s var(--tp-ease);
}

.topp-hero__crumb a:hover {
  color: var(--tp-green-link);
}

.topp-hero__crumb .topp-hero__crumb-sep {
  margin: 0 8px;
  color: rgba(28, 58, 64, 0.3);
}

.topp-hero__body {
  padding-bottom: 56px;
}

.topp-hero__kicker {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-green-link);
}

.topp-hero__title {
  margin: 0 0 18px;
  max-width: 22ch;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  color: var(--tp-ink);
}

/* pages.css resets `.page-home h1` (font-size/margin) with class+element
   specificity that beats a plain class selector — out-specify it here. */
body.page-home main h1.topp-hero__title {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 44px);
}

.topp-hero__lead {
  margin: 0 0 24px;
  max-width: 760px;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--tp-ink);
}

/* Person hero: text left, portrait right */
.topp-hero__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px 56px;
}

.topp-hero__text {
  flex: 1 1 380px;
  min-width: 0;
}

/* Ranks 4-20 have no portrait: keep the text at a readable line length. */
.topp-hero__text--solo {
  max-width: 760px;
}

.topp-hero__rank-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.topp-hero__rank-number {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--tp-green-link);
  font-variant-numeric: tabular-nums;
}

.topp-hero__lead-inline {
  margin: 0 0 22px;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--tp-ink);
}

.topp-hero__bio {
  margin: 0 0 26px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--tp-ink);
}

.topp-hero__portrait-slot {
  flex: 0 1 300px;
  min-width: 220px;
}

@media (max-width: 768px) {
  .topp-hero__portrait-slot {
    flex-basis: 100%;
  }
}

.topp-anchor-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--tp-green-link);
  text-decoration: none;
  transition: color 0.15s var(--tp-ease);
}

.topp-anchor-link:hover {
  color: var(--tp-green-deep);
}

/* ---------- Icon link (LinkedIn) ---------- */
.topp-iconlink,
.topp-iconlink:visited {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--tp-green-link);
  text-decoration: none;
  transition: color 0.15s var(--tp-ease);
}

.topp-iconlink svg {
  flex: none;
}

.topp-iconlink:hover,
.topp-iconlink:visited:hover {
  color: var(--tp-green-deep);
}

/* ---------- Portrait: 4:5, mint + initials fallback (hero/top-3/jury) ---------- */
.topp-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--tp-mint);
  border-radius: var(--tp-radius);
}

.topp-portrait--framed {
  border: 1px solid var(--tp-border-card);
}

.topp-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topp-portrait__initials {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -0.01em;
  color: var(--tp-green-deep);
  opacity: 0.42;
}

.topp-portrait--lg .topp-portrait__initials {
  font-size: 72px;
}

/* ---------- Avatar: 56x56 square, mint + initials fallback (rank rows) ---------- */
.topp-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--tp-radius-avatar);
  overflow: hidden;
  background: var(--tp-mint);
  display: grid;
  place-items: center;
}

.topp-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topp-avatar__initials {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--tp-green-deep);
}

/* ---------- Section heads ---------- */
.topp-section {
  padding-top: 48px;
}

.topp-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.topp-section__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 28px;
  color: var(--tp-ink);
}

/* pages.css resets `.page-home main h2` font-size to 20px and margin to
   `0 !important` — out-specify (and, for margin, out-important) it here. */
body.page-home main h2.topp-section__title {
  margin: 0 !important;
  font-size: 28px;
}

/* Title directly followed by content (no .topp-section__head wrapper).
   Needs !important for the same reason as the rule above. */
body.page-home main h2.topp-section__title--spaced {
  margin-bottom: 24px !important;
}

.topp-section__lead {
  margin: 0 0 28px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--tp-ink);
}

/* ---------- Top 3 cards ---------- */
.topp-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 16px 0 28px;
}

@media (max-width: 640px) {
  .topp-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.topp-top-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--tp-paper);
  border: 1px solid var(--tp-border-grid);
  border-radius: var(--tp-radius);
}

.topp-top-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.topp-top-card__rank {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--tp-green-link);
  font-variant-numeric: tabular-nums;
}

.topp-top-card__name {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.18;
  color: var(--tp-ink);
  transition: color 0.16s var(--tp-ease);
}

.topp-top-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.topp-top-card__role {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  color: var(--tp-graphite);
}

.topp-top-card__arrow {
  flex: none;
  display: flex;
  color: var(--tp-ink);
  transition: color 0.16s var(--tp-ease);
}

.topp-top-card:hover .topp-top-card__name,
.topp-top-card:hover .topp-top-card__arrow,
.topp-top-card:focus-visible .topp-top-card__name,
.topp-top-card:focus-visible .topp-top-card__arrow {
  color: var(--tp-green-brand);
}

/* ---------- Rank rows (4-20) ---------- */
.topp-rank-list {
  border-top: 1px solid var(--tp-border-grid);
}

.topp-rank-row {
  display: grid;
  grid-template-columns: 48px 56px minmax(0, 1fr) auto;
  gap: clamp(12px, 2.4vw, 24px);
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--tp-rule);
  text-decoration: none;
  color: inherit;
}

/* Ranks 4-20 have no photo: drop the avatar column. */
.topp-rank-row--no-avatar {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.topp-rank-row:last-child {
  border-bottom: none;
}

.topp-rank-row__number {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--tp-ink);
  font-variant-numeric: tabular-nums;
}

.topp-rank-row__number--top {
  color: var(--tp-green-link);
}

.topp-rank-row__name {
  display: block;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.18;
  color: var(--tp-ink);
  transition: color 0.16s var(--tp-ease);
}

.topp-rank-row__role {
  display: block;
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  color: var(--tp-graphite);
}

.topp-rank-row__arrow {
  flex: none;
  display: flex;
  color: var(--tp-ink);
  transition: color 0.16s var(--tp-ease);
}

.topp-rank-row:hover .topp-rank-row__name,
.topp-rank-row:hover .topp-rank-row__arrow,
.topp-rank-row:focus-visible .topp-rank-row__name,
.topp-rank-row:focus-visible .topp-rank-row__arrow {
  color: var(--tp-green-brand);
}

/* ---------- Jury grid: 5 -> 3 -> 2 -> 1 (never 4 — see README) ---------- */
.topp-jury-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1140px) {
  .topp-jury-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topp-jury-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .topp-jury-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.topp-jury-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--tp-paper);
  border: 1px solid var(--tp-border-grid);
  border-radius: var(--tp-radius);
}

.topp-jury-card__body {
  padding: 18px 20px 20px;
}

.topp-jury-card__chair {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tp-green-link);
}

.topp-jury-card__name {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.18;
  color: var(--tp-ink);
}

.topp-jury-card__role {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  color: var(--tp-graphite);
}

/* ---------- Process steps ---------- */
.topp-process-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topp-process-step {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--tp-rule);
}

.topp-process-step:last-child {
  border-bottom: none;
}

.topp-process-step__meta {
  display: flex;
  flex: 0 0 200px;
  align-items: baseline;
  gap: 14px;
}

.topp-process-step__number {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 27px;
  line-height: 1;
  color: var(--tp-green-brand);
  font-variant-numeric: tabular-nums;
}

.topp-process-step__when {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tp-graphite);
}

.topp-process-step__body {
  flex: 1 1 320px;
  min-width: 0;
}

.topp-process-step__title {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.18;
  color: var(--tp-ink);
}

.topp-process-step__desc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--tp-ink);
}

.topp-areas-kicker {
  margin: 20px 0 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tp-graphite);
}

.topp-areas-list {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.topp-areas-list li {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--tp-ink);
}

.topp-areas-list li::marker {
  color: var(--tp-green-brand);
}

/* ---------- Nomination CTA ---------- */
.topp-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  color: #ffffff;
  background: var(--tp-green-brand);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--tp-ease);
}

.topp-cta-btn:hover,
.topp-cta-btn:focus-visible {
  background: var(--tp-green-deep);
}

.topp-cta-btn[aria-disabled="true"],
.topp-cta-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Preview bar: editors looking at an unpublished edition ---------- */
.topp-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: #fff4e5;
  border-bottom: 2px solid #e0a030;
  color: #5c3b00;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
}

.topp-preview-bar a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
