/* ==========================================================================
   Registro Yudansha (pages/nosotros/reg_yudansha.html)
   One bold element: the rank kanji as each tier's mark (same ink as the
   ¿Qué es Aikido? kanji strip). Everything else stays quiet. Tokens from
   custom.css :root; works on every dojo theme (themes only touch the sidenav).
   ========================================================================== */

.yudansha-hero .yudansha-hakama {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--shadow-soft, 0 10px 28px rgba(35, 48, 60, 0.14));
  object-fit: cover;
}

.yudansha-intro {
  max-width: 68ch;
  margin: 0 auto 1.5rem;
  color: #4d5965;
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}

/* Search + country filter (revealed by yudansha.js; the list works without it) */
.dan-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  padding: 1rem 1.5rem;
  background: #fbfbfc;
}
.dan-search {
  flex: 0 1 18rem;
  border-radius: var(--radius-pill, 999px);
  padding-left: 1rem;
}
.dan-country-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  border: 1px solid #dfe3e8;
  border-radius: var(--radius-pill, 999px);
  background: #fff;
  color: #4d5965;
  font-size: 0.85rem;
  line-height: 1.2;
  cursor: pointer;
}
.dan-chip img { width: 20px; height: 20px; }
.dan-chip[aria-pressed="true"] {
  border-color: var(--brand-red, #ed5565);
  color: var(--brand-red-deep, #c93a49);
  font-weight: 600;
}
.dan-empty {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e7eaee;
  color: #68737e;
}

/* The roll: one white surface, tiers separated by hairlines */
.yudansha-roll {
  background: #fff;
  border: 1px solid #e7eaee;
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--site-shadow, 0 1px 4px rgba(130, 143, 163, 0.15));
  margin-bottom: 2rem;
  overflow: hidden;
}
.dan-tier {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  border-top: 1px solid #e7eaee; /* the toolbar sits above the first tier */
  scroll-margin-top: 90px; /* clear the fixed topbar on #anchor jumps */
}
.dan-filters[hidden] + .dan-empty[hidden] + .dan-tier { border-top: 0; } /* no-JS: no toolbar above */

.dan-tier-mark {
  display: flex;
  justify-content: flex-start; /* vertical-rl: start = top, beside the heading */
  align-items: center;
  padding: 1.35rem 0;
  border-right: 2px solid var(--brand-red, #ed5565);
  background: #f7f8fa;
  color: var(--charcoal-deep, #23303c);
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.dan-tier-body { padding: 1.25rem 1.5rem 1.1rem; }
.dan-tier-head h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal-deep, #23303c);
}
.dan-romaji {
  margin-left: 0.4rem;
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: #68737e;
}

/* Members: rows in columns, not cards */
.dan-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  column-gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dan-member {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f0f2f5;
}
.dan-name {
  font-weight: 600;
  color: var(--charcoal-deep, #23303c);
  overflow-wrap: anywhere;
}
.dan-name a { color: inherit; text-decoration: underline; text-decoration-color: rgba(237, 85, 101, 0.5); text-underline-offset: 3px; }
.dan-name a:hover { color: var(--brand-red-deep, #c93a49); }
/* Meta line: rank chip with the nationality flag beside it (no country text —
   Roberto 2026-11-05: "just put the flag next to the Dan … that's enough") */
.dan-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dan-rank {
  padding: 0.05rem 0.45rem;
  border: 1px solid #d5dae0;
  border-radius: var(--radius-pill, 999px);
  color: var(--charcoal-deep, #23303c);
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
}
.dan-flag { width: 22px; height: 22px; }

/* Keyboard focus */
.dan-chip:focus-visible,
.dan-name a:focus-visible,
.dan-search:focus-visible {
  outline: 2px solid var(--brand-red, #ed5565);
  outline-offset: 2px;
  box-shadow: none;
}

/* Phones: kanji sits beside the tier heading, filters go full width */
@media (max-width: 575.98px) {
  /* kanji + heading share the first row, members run full width below */
  .dan-tier {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.65rem;
    padding: 0.9rem 1rem 0.8rem;
  }
  .dan-tier-body { display: contents; }
  .dan-tier-mark {
    writing-mode: horizontal-tb;
    padding: 0 0 0.2rem;
    border-right: 0;
    border-bottom: 2px solid var(--brand-red, #ed5565);
    background: none;
    font-size: 1.45rem;
    letter-spacing: 0.02em;
  }
  .dan-tier-head h2 { margin: 0; }
  .dan-members { grid-column: 1 / -1; margin-top: 0.6rem; }
  .dan-filters { padding: 0.9rem 1rem; }
  .dan-search { flex-basis: 100%; }
}

