/* AGENT BREAK — components and page layouts (canvas AB-* designs). */

/* =========================================================
   Section scaffolding
   ========================================================= */
.home-section { padding-top: var(--section-gap); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: 48px;
}
.section-head__titles { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.section-head__aside { max-width: 380px; color: var(--muted); font-size: 15px; }
.section-head__link { flex: none; }
.section-more { display: none; margin-top: 16px; width: 100%; }
@media (max-width: 767px) {
  .home-section { padding-top: 80px; }
  .section-head { margin-bottom: 24px; }
  .section-head .display--lg { font-size: 44px; }
  .section-head__link { display: none; }
  .section-more { display: flex; }
}

/* =========================================================
   Hero (contract §7 markup). hero.css (3D owner) layers canvas/intro on top.
   ========================================================= */
.hero {
  position: relative;
  height: clamp(560px, calc(100svh - var(--header-h)), 960px);
  overflow: hidden;
  isolation: isolate;
  background: #050403;
  border-bottom: 1px solid var(--line-soft);
}
.hero__poster,
.hero__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__poster { z-index: 0; pointer-events: none; user-select: none; -webkit-user-select: none; }
.hero__poster img { -webkit-user-drag: none; }
.hero__poster img { object-fit: cover; }
.hero__copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 20px;
  text-align: center;
  pointer-events: none;
}
.hero__copy a, .hero__copy button { pointer-events: auto; }
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .32em;
  color: var(--text);
  text-shadow: 0 0 24px #000, 0 0 8px #000;
}
.hero__title {
  margin: 0;
  font-size: clamp(64px, 8.4vw, 132px);
  line-height: .92;
  letter-spacing: .01em;
  text-shadow: 0 0 40px rgba(0, 0, 0, .7);
}
.hero__subtitle {
  max-width: 520px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
  line-height: 1.55;
  text-shadow: 0 0 20px #000, 0 0 40px #000;
  word-break: keep-all;
}
.hero__status {
  position: absolute;
  left: var(--gutter);
  bottom: 36px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
  text-shadow: 0 0 12px #000;
  pointer-events: none;
}
.hero__status-accent { color: var(--accent); }
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  min-height: 44px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--text-2);
  text-shadow: 0 0 12px #000;
}
.hero__scroll:hover { color: var(--accent-hover); }
/* Keep the logo off the sphere. Wide: sphere right, copy left. Narrower: sphere up, copy below.
   The poster shift matches the 3D camera offset in web/js/hero/scene.js so nothing jumps at the crossfade. */
@media (min-width: 1024px) {
  .hero__poster img { transform: translateX(20%) scale(1.12); }
  .hero__copy {
    left: 0; right: 0;
    max-width: var(--container, 1280px);
    margin-inline: auto;
    align-items: flex-start;
    padding: 0 var(--gutter);
    text-align: left;
  }
  .hero__subtitle { max-width: 420px; }
  .hero__scroll { left: var(--gutter); transform: none; align-items: flex-start; padding-inline: 0; }
  .hero__status { left: auto; right: var(--gutter); text-align: right; }
}
@media (max-width: 1023px) {
  /* Tablet poster (poster-tablet-redshift) is already framed for this layout: sphere high, room below. */
  .hero__poster img { object-position: 50% 20%; transform: none; }
  .hero__copy { justify-content: flex-end; gap: 18px; padding-bottom: 96px; }
  .hero__title { font-size: clamp(64px, 11vw, 104px); }
}
@media (max-width: 767px) {
  .hero { height: clamp(520px, calc(100svh - var(--header-h)), 720px); }
  .hero__poster img { transform: translateY(-13%) scale(1.08); }
  .hero__copy { gap: 14px; padding: 0 24px 64px; }
  .hero__eyebrow { font-size: 11px; letter-spacing: .3em; }
  .hero__title { font-size: 56px; }
  .hero__subtitle { font-size: 16px; max-width: 300px; }
  .hero__status { display: none; }
  .hero__scroll { bottom: 8px; font-size: 11px; }
}

/* =========================================================
   Home: introduction, research areas, contact CTA
   ========================================================= */
.intro {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
}
.intro__label { flex: 1 1 220px; }
.intro__main { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.intro__heading {
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -.01em;
  word-break: keep-all;
}
.intro__body { color: var(--text-2); max-width: 760px; word-break: keep-all; }
@media (max-width: 767px) {
  .intro { gap: 20px; }
  .intro__label { font-size: 12px; }
}

.area-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0 32px;
}
.area {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 0;
  border-top: 1px solid rgba(242, 242, 240, .14);
}
.area__num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.area__body { display: flex; flex-direction: column; gap: 14px; }
.area__title { font-size: 24px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.area__text { color: var(--muted); font-size: 16px; word-break: keep-all; }
@media (max-width: 767px) {
  .area { flex-direction: row; gap: 16px; padding: 20px 0; }
  .area:last-child { border-bottom: 1px solid rgba(242, 242, 240, .14); }
  .area__num { font-size: 12px; padding-top: 4px; }
  .area__body { gap: 4px; }
  .area__title { font-size: 19px; }
  .area__text { font-size: 15px; }
}

.home-contact { padding-top: clamp(120px, 14vw, 200px); }
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid rgba(242, 242, 240, .14);
  background: var(--surface);
}
.contact-cta__main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact-cta__title { font-size: clamp(56px, 9vw, 136px); line-height: .95; }
.contact-cta__content { display: flex; flex-direction: column; gap: 24px; }
.contact-cta__text { max-width: 480px; font-size: 18px; color: var(--text-2); word-break: keep-all; }
.contact-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-cta__actions .btn { max-width: 100%; }
.contact-cta__email { overflow-wrap: anywhere; }
.contact-cta__mail-label { white-space: nowrap; }
.contact-cta .state { padding: 0; border: 0; background: none; align-items: flex-start; text-align: left; }
@media (max-width: 767px) {
  .home-contact { padding-top: 96px; }
  .contact-cta { padding: 32px 24px; gap: 18px; }
  .contact-cta__main { gap: 18px; }
  .contact-cta__title { font-size: 60px; }
  .contact-cta__text { font-size: 16px; }
  .contact-cta__actions { flex-direction: column; }
  .contact-cta__actions .btn { width: 100%; }
}

/* =========================================================
   Media boxes
   ========================================================= */
.media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--empty, .media--broken {
  background:
    repeating-linear-gradient(135deg, rgba(242, 242, 240, .035) 0 1px, transparent 1px 14px),
    var(--surface-2);
}
.media--empty::after, .media--broken::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("/assets/logo/logo-outline-white.png") center / contain no-repeat;
  opacity: .08;
}

/* =========================================================
   Project cards
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.card-grid--home { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: border-color .2s ease;
}
.project-card:hover { border-color: rgba(242, 242, 240, .3); }
.project-card__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}
.project-card__period { color: var(--muted); }
.project-card__title { font-size: 22px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.project-card__link { color: var(--text); }
.project-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
@supports selector(:has(a)) {
  .project-card:has(.project-card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  .project-card__link:focus-visible { outline: none; }
}
.project-card:hover .project-card__link { color: var(--accent-hover); }
.project-card__summary {
  color: var(--muted);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card .tag-list { margin-top: auto; }
@media (max-width: 767px) {
  .card-grid, .card-grid--home { gap: 16px; }
  .project-card__body { padding: 18px; gap: 10px; }
  .project-card__title { font-size: 19px; }
  .project-card__summary { font-size: 14px; }
}

/* =========================================================
   Achievement rows
   ========================================================= */
.ach-list { list-style: none; border-top: 1px solid rgba(242, 242, 240, .14); }
.ach-row { border-bottom: 1px solid rgba(242, 242, 240, .14); }
.ach-row__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 40px;
  padding: 28px 0;
  color: var(--text);
}
.ach-row__type {
  flex: 0 0 160px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--accent);
}
.ach-row__main { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ach-row__title { font-size: 22px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.ach-row__sub {
  font-size: 15px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ach-row__date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.ach-row__arrow { display: inline-flex; color: var(--muted); transition: transform .2s ease, color .2s ease; }
.ach-row__link:hover .ach-row__title { color: var(--accent-hover); }
.ach-row__link:hover .ach-row__arrow { color: var(--accent-hover); transform: translateX(4px); }
.ach-list--grouped { border-top: 0; }
.ach-list--grouped .ach-row__link { gap: 8px 32px; padding: 24px 0; }
.ach-list--grouped .ach-row__type { flex-basis: 140px; }
.ach-list--grouped .ach-row__title { font-size: 20px; }
.ach-list--grouped .ach-row__sub { font-size: 14px; }
@media (max-width: 767px) {
  .ach-row__link, .ach-list--grouped .ach-row__link {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 18px 0;
  }
  .ach-row__type { grid-column: 1; grid-row: 1; font-size: 11px; letter-spacing: .14em; }
  .ach-row__date { grid-column: 2; grid-row: 1; font-size: 11px; letter-spacing: .14em; }
  .ach-row__main { grid-column: 1 / -1; grid-row: 2; }
  .ach-row__title, .ach-list--grouped .ach-row__title { font-size: 18px; }
  .ach-row__sub { font-size: 14px; }
  .ach-row__arrow { display: none; }
}

/* =========================================================
   States (AB-States)
   ========================================================= */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 96px 24px;
  text-align: center;
}
.state--empty { border: 1px dashed rgba(242, 242, 240, .24); color: var(--muted); }
.state--empty svg { color: var(--muted); }
.state--compact { padding: 40px 24px; align-items: flex-start; text-align: left; }
.state__title { overflow-wrap: anywhere; font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.45; }
.state--compact .state__title { font-size: 17px; font-weight: 500; color: var(--text-2); }
.state__text { color: var(--muted); max-width: 520px; }
.state__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.state__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.state--error {
  align-items: flex-start;
  text-align: left;
  padding: 32px 28px;
  border: 1px solid rgba(232, 162, 58, .5);
  background: rgba(232, 162, 58, .06);
}
.state--error svg { color: var(--accent); }
.state--error .state__text { color: var(--text-2); }
.state--loading { padding: 0; align-items: stretch; text-align: left; gap: 20px; }
.state__status {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
}
.skeleton-list--cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}
.skeleton-list--rows { border-top: 1px solid var(--line); }
.skeleton-list--none { display: none; }
.skeleton-card { background: var(--surface); border: 1px solid var(--line-soft); }
.skeleton-card__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.skeleton-row { display: flex; align-items: center; gap: 40px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.skeleton-detail { display: flex; flex-direction: column; gap: 16px; padding: 24px 0; }
.skeleton { background: var(--surface-2); animation: pulse 1.6s ease-in-out infinite; }
.skeleton--strong { background: var(--surface-3); }
.skeleton--media { aspect-ratio: 16 / 10; }
@keyframes pulse { 50% { opacity: .55; } }
@media (max-width: 767px) {
  .state { padding: 64px 20px; }
  .skeleton-row { gap: 16px; }
}

/* 404 */
.not-found {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(440px, 64vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  background: #050403;
}
.not-found__bg, .not-found__bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.not-found__bg img { object-fit: cover; opacity: .7; }
.not-found::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(5, 4, 3, .92) 0%, rgba(5, 4, 3, .55) 45%, rgba(5, 4, 3, 0) 100%);
}
.not-found__body { padding: clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: 12px; }
.not-found__code { font-family: var(--font-display); font-size: clamp(88px, 12vw, 160px); line-height: .9; color: var(--accent); }
.not-found__title { font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; line-height: 1.35; }
.not-found__text { color: var(--text-2); }
.not-found__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.notfound-page { padding-top: 56px; }
.detail-page .not-found { margin-top: 32px; }

/* =========================================================
   List pages (projects / achievements)
   ========================================================= */
.list-page { padding-top: clamp(64px, 8vw, 112px); }
.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.list-head--stack { flex-direction: column; align-items: flex-start; gap: 12px; border-bottom: 0; }
.list-head__titles { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.list-head__titles .display, .list-head--stack .display { overflow-wrap: anywhere; }
.list-head__search { flex: 0 1 380px; min-width: min(100%, 280px); display: flex; flex-direction: column; gap: 8px; }

.filter-bar { padding: 28px 0 40px; }
.filter-bar--boxed {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 24px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.filter-bar__fields { display: flex; flex-wrap: wrap; gap: 16px; min-width: 0; }
.field--year { width: 160px; }
.field--search { width: 260px; max-width: 100%; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  max-width: 100%;
  overflow-wrap: anywhere;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.chip-btn:hover { border-color: var(--text); }
.chip-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--on-accent); font-weight: 600; }

.seg-group { display: flex; flex-wrap: wrap; border: 1px solid var(--line-strong); max-width: 100%; }
.seg-btn {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line-soft); }
.seg-btn:hover { background: rgba(242, 242, 240, .06); }
.seg-btn[aria-pressed="true"] { background: var(--text); color: var(--on-accent); font-weight: 600; }
.seg-btn:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--accent); outline-offset: 3px; }

.results { min-height: 240px; }
.results:focus { outline: none; }
.year-group { display: flex; flex-wrap: wrap; gap: 0 48px; padding-top: 48px; }
.year-group__year {
  flex: 0 0 120px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.4;
  color: var(--muted);
}
.year-group .ach-list { flex: 1 1 640px; min-width: 0; }
.results > .state--empty, .results > .state--error { margin-top: 48px; }
.list-page .results > .state--empty:first-child, .list-page .results > .state--error:first-child { margin-top: 8px; }

.pagination { padding-top: 64px; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 242, 240, .2);
  font-family: var(--font-mono);
  font-size: 14px;
}
.page-btn:hover { border-color: var(--text); color: var(--text); }
.page-btn[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--on-accent); }
.page-gap { width: 24px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }

@media (max-width: 767px) {
  .list-head { padding-bottom: 32px; }
  .list-head__search { flex-basis: 100%; }
  .filter-bar { padding: 20px 0 28px; }
  .filter-bar__fields { width: 100%; }
  .field--year { flex: 1 1 120px; width: auto; }
  .field--search { flex: 2 1 180px; width: auto; }
  .seg-group { width: 100%; }
  .seg-btn { flex: 1 1 auto; padding: 0 12px; font-size: 14px; }
  .year-group { padding-top: 32px; }
  .year-group__year { flex-basis: 100%; font-size: 32px; line-height: 1.2; margin-bottom: 8px; }
  .pagination { padding-top: 40px; }
}

/* =========================================================
   Detail pages
   ========================================================= */
.detail-page { padding-top: 56px; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-hover); }
.breadcrumb [aria-current] {
  color: var(--text);
  max-width: min(60vw, 640px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-head { padding: 48px 0 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 960px; }
.detail-head__title {
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.detail-head__title:focus { outline: none; }
.detail-head__summary { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 760px; word-break: keep-all; }
.meta-inline { display: flex; flex-wrap: wrap; gap: 16px 48px; font-size: 14px; }
.meta-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.meta-row dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.meta-row dd { margin: 0; }
.meta-row__tags { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-mono); font-size: 12px; }
.tag { padding: 2px 8px; background: rgba(242, 242, 240, .08); max-width: 100%; overflow-wrap: anywhere; }

.detail-cover { border: 1px solid var(--line-soft); }
.detail-cover--ach { margin-top: 56px; }

.detail-body { display: flex; flex-wrap: wrap; gap: 64px; padding-top: 80px; }
.detail-article { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 56px; }
.back-link { align-self: flex-start; }
.detail-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.side-block { display: flex; flex-direction: column; }
.side-block__title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--muted);
}
.resource-list, .related-list, .related-cards { list-style: none; }
.resource-list li:last-child, .related-list li:last-child { border-bottom: 1px solid var(--line); }
.resource-link, .related-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.resource-link__text { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.resource-link__kind { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--accent); }
.resource-link__label { font-size: 16px; overflow-wrap: anywhere; }
.resource-link__icon { flex: none; }
.related-link { flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.45; }
.related-link__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.related-link__title { font-size: 16px; overflow-wrap: anywhere; }
.resource-link:hover .resource-link__label, .related-link:hover .related-link__title { color: var(--accent-hover); }

.related-cards { display: flex; flex-direction: column; gap: 12px; }
.related-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  line-height: 1.45;
  color: var(--text);
}
.related-card:hover { border-color: rgba(242, 242, 240, .3); }
.related-card__media { flex: none; width: 88px; }
.related-card__text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.related-card__title { font-size: 16px; overflow-wrap: anywhere; }
.related-card .status-chip { font-size: 11px; padding: 1px 8px; }

/* achievement header + meta panel */
.ach-head {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 64px;
  padding: 48px 0 64px;
  border-bottom: 1px solid var(--line);
}
.ach-head__main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.ach-head__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ach-head__date { font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.tag-list--detail { font-size: 12px; }
.meta-panel {
  flex: 1 1 320px;
  min-width: 0;
  align-self: flex-start;
  margin: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 24px;
  align-content: start;
  font-size: 15px;
  line-height: 1.5;
}
.meta-panel dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  padding-top: 2px;
  white-space: nowrap;
}
.meta-panel dd { margin: 0; overflow-wrap: anywhere; }
.meta-rank__num { font-family: var(--font-display); font-size: 34px; line-height: 1; }
.meta-rank__total { font-size: 15px; color: var(--muted); }
.meta-ids { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.meta-ids code { font-family: var(--font-mono); font-size: 14px; }
@media (max-width: 767px) {
  .detail-page { padding-top: 24px; }
  .detail-head { padding: 28px 0 40px; gap: 18px; }
  .ach-head { padding: 28px 0 40px; gap: 32px; }
  .meta-panel { padding: 20px; gap: 12px 16px; }
  .detail-body { padding-top: 48px; gap: 48px; }
  .detail-article { gap: 40px; }
  .detail-cover--ach { margin-top: 40px; }
}

/* =========================================================
   Markdown prose
   ========================================================= */
.prose { color: var(--text-2); font-size: 17px; line-height: 1.75; min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--text); font-weight: 600; line-height: 1.4; word-break: keep-all; }
.prose h2 { font-size: 28px; margin-top: 56px; }
.prose h3 { font-size: 22px; margin-top: 40px; }
.prose h4, .prose h5, .prose h6 { font-size: 18px; margin-top: 32px; }
.prose > :first-child { margin-top: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 14px; }
.prose p, .prose li { overflow-wrap: anywhere; word-break: keep-all; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: .1em .35em;
  background: var(--surface-2);
  color: var(--code);
  overflow-wrap: anywhere;
}
.prose pre {
  margin-inline: 0;
  padding: 20px 24px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--code);
  tab-size: 2;
}
.prose pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li > ul, .prose li > ol { margin-top: .4em; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--muted); font-family: var(--font-mono); font-size: .9em; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--text-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line-soft); }
.prose .md-img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
}
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; background: var(--surface); }
.prose tr:last-child td { border-bottom: 0; }
.prose del { color: var(--muted); }
@media (max-width: 767px) {
  .prose { font-size: 16px; }
  .prose h2 { font-size: 23px; margin-top: 44px; }
  .prose h3 { font-size: 19px; }
  .prose pre { padding: 16px; font-size: 13px; }
}

/* =========================================================
   Page hero (About / Contact)
   ========================================================= */
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(56px, 7vw, 96px);
}
.page-hero__inner--stack { flex-direction: column; align-items: flex-start; gap: 24px; position: relative; z-index: 1; padding-bottom: clamp(56px, 7vw, 104px); }
.page-hero__text { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.page-hero__word { color: var(--accent); }
.page-hero__word--contact { font-size: clamp(64px, 11vw, 168px); line-height: .88; }
.page-hero__title {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.02em;
  word-break: keep-all;
}
.page-hero__lead { max-width: 560px; font-size: 18px; color: var(--text-2); word-break: keep-all; }
.page-hero__mark { flex: 0 0 auto; width: clamp(160px, 20vw, 280px); opacity: .92; }
@media (max-width: 767px) {
  .page-hero__mark { display: none; }
  .page-hero__lead { font-size: 16px; }
}

/* split section: mono label left, content right */
.split-section { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: 96px; }
.split-section__label { flex: 1 1 220px; margin: 0; }
.split-section__main { flex: 3 1 560px; min-width: 0; max-width: 760px; }
.prose--about { display: flex; flex-direction: column; }
.prose--about h2 { font-size: 26px; margin-top: 48px; }
.prose--about > :first-child { margin-top: 0; }
@media (max-width: 767px) {
  .split-section { padding-top: 64px; gap: 20px; }
}

/* members */
.member-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.member {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.member__avatar { width: 72px; height: 72px; object-fit: cover; background: var(--surface-2); }
.member__avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--accent);
}
.member__id { display: flex; flex-direction: column; gap: 2px; }
.member__name { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.member__role { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.member__interests { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.member__links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 242, 240, .2);
  color: var(--text);
}
.icon-btn:hover { border-color: var(--accent-hover); color: var(--accent-hover); }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(242, 242, 240, .14);
  color: var(--text);
}
.cta-band:hover { border-color: rgba(242, 242, 240, .35); color: var(--text); }
.cta-band:hover .cta-band__btn { background: var(--accent-hover); border-color: var(--accent-hover); }
.cta-band__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cta-band__text .eyebrow { font-size: 12px; }
.cta-band__title { font-size: clamp(20px, 2vw, 26px); font-weight: 600; word-break: keep-all; }

/* =========================================================
   Contact page
   ========================================================= */
.contact-section { padding-top: clamp(64px, 7vw, 96px); }
.contact-section__title { margin: 0 0 32px; font-weight: 500; }
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.channel {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.channel--primary { border-color: var(--accent-soft); }
.channel__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; color: var(--muted); }
.channel__eyebrow--accent, .channel__icon--accent { color: var(--accent); }
.channel__icon { display: inline-flex; color: var(--muted); }
.channel__title { font-size: 24px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.channel__title--break { word-break: break-all; }
.channel__text { font-size: 15px; color: var(--muted); }
.channel__text--mono { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.channel__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.channel__status { min-height: 1.5em; font-size: 14px; color: var(--accent); }
.channel__status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.channel { position: relative; }
@media (max-width: 767px) {
  .channel { padding: 24px; }
  .channel__title { font-size: 20px; }
}

.split-section--guide { padding-top: clamp(80px, 9vw, 120px); }
.guide-list { list-style: none; }
.guide-list li { display: flex; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.guide-list li:last-child { border-bottom: 1px solid var(--line); }
.guide-list__num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 4px; flex: none; }
.guide-list h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.guide-list p { color: var(--muted); word-break: keep-all; }
.contact-note { padding-top: 56px; font-size: 14px; color: var(--muted); }
@media (max-width: 767px) {
  .guide-list li { gap: 16px; padding: 20px 0; }
  .guide-list h3 { font-size: 18px; }
}

/* About: page logos only on desktop. Tablet and phone drop the hero mark, mobile-menu watermark and
   footer badge; the header banner keeps its badge like every other page. */
@media (max-width: 1023px) {
  .page-about .page-hero__mark,
  .page-about .mobile-menu__mark,
  .page-about .site-footer__logo { display: none; }
}
