/* Memoed — For Judges (/for-judge/)
   Page-only layout and components. Tokens, header, footer, film facade, buttons
   and tags come from /shared-chrome.css; nothing here redefines that chrome. */

/* ------------------------------------------------------------------
   Page frame (base reset, skip link and tokens live in shared-chrome.css)
   ------------------------------------------------------------------ */
.judge {
  padding: 64px 0 104px;
  overflow-x: clip;
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.judge-hero {
  display: grid;
  gap: 44px;
}

.judge-head {
  max-width: 820px;
}

.judge-head .eyebrow {
  margin: 0 0 18px;
}

.judge-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.judge-title em {
  font-style: italic;
  color: var(--ink-2);
}

.judge-lede {
  max-width: 660px;
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.judge-surfaces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.judge-surfaces li {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
}

/* Film + submission links, height-matched so the five links finish flush
   with the bottom of the film caption (no blank void under the video). */
.judge-top {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.judge-top .film {
  margin: 0;
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.judge-links {
  min-width: 0;
  display: grid;
  grid-template-rows: auto repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.judge-links-label {
  margin: 0 0 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}

.judge-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}

.judge-link:hover {
  border-color: rgba(25, 29, 26, 0.32);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.judge-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.judge-link-num {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.judge-link-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.judge-link-text strong {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.judge-link-text span {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.judge-link-arrow {
  font-size: 14px;
  color: var(--faint);
  transition: color 160ms var(--ease), transform 200ms var(--ease);
}

.judge-link:hover .judge-link-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

.judge-link-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.judge-link-primary:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}

.judge-link-primary .judge-link-num,
.judge-link-primary .judge-link-text span,
.judge-link-primary .judge-link-arrow,
.judge-link-primary:hover .judge-link-arrow {
  color: rgba(255, 255, 255, 0.68);
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */
.judge-section {
  margin-top: 96px;
  scroll-margin-top: calc(var(--header-h, 60px) + 24px);
}

.judge-section-head {
  max-width: 680px;
  margin-bottom: 32px;
}

.judge-section-head .eyebrow {
  margin: 0 0 12px;
}

.judge-section-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.judge-section-lede {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Verify grid */
.verify-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.verify-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.verify-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.verify-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}

.verify-card .proof-stat {
  display: inline-flex;
  margin: 0;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--lived-line);
  background: var(--lived-bg);
  color: var(--lived);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.verify-card h3 {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.verify-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.verify-card ol li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.verify-note {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.verify-card code,
.install-card code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--paper-2);
  font-size: 0.86em;
}

.verify-card code.cmd {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px;
  white-space: nowrap;
  overflow-x: auto;
}

/* Install grid */
.install-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.install-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.install-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
  white-space: nowrap;
}

.install-badge-num {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}

.install-card h3 {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.install-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.install-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.install-card ol a {
  color: var(--accent);
  font-weight: 600;
}

.install-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  justify-items: start;
  gap: 12px;
}

.install-foot .btn {
  min-height: 40px;
  font-size: 14px;
}

.install-foot .text-link {
  font-size: 13.5px;
}

.judge-foot {
  margin: 40px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .install-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .judge {
    padding: 48px 0 88px;
  }

  .judge-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .judge-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .judge-links-label,
  .judge-link-primary {
    grid-column: 1 / -1;
  }

  .verify-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .judge-section {
    margin-top: 80px;
  }
}

@media (max-width: 760px) {
  .judge {
    padding: 36px 0 72px;
  }

  .judge-hero {
    gap: 32px;
  }

  .judge-lede {
    font-size: 16.5px;
  }

  .judge-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .judge-section {
    margin-top: 64px;
  }

  .judge-section-head {
    margin-bottom: 24px;
  }
}

@media (max-width: 520px) {
  .judge {
    padding: 28px 0 64px;
  }

  .judge-title {
    font-size: clamp(34px, 10vw, 42px);
  }

  .judge-surfaces li {
    font-size: 13px;
    padding: 5px 11px;
  }

  .judge-link {
    gap: 12px;
    padding: 11px 14px;
  }

  .verify-card,
  .install-card {
    padding: 20px;
    border-radius: 16px;
  }

  .verify-card-top {
    flex-wrap: wrap;
  }
}

@media (max-width: 360px) {
  .judge-link-num {
    display: none;
  }

  .judge-link {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .judge-link,
  .judge-link-arrow {
    transition: none;
  }

  .judge-link:hover,
  .judge-link:hover .judge-link-arrow {
    transform: none;
  }
}
