.page-yrdraziw-wiki {
  min-height: 100dvh;
  background: #000;
}

.yrw-main {
  width: 100%;
  max-width: var(--design-w);
  margin: 0 auto;
  padding: 1rem var(--pad-x) 2rem;
}

.yrw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: center;
  padding: 0.75rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
}

.yrw-hero__visual {
  border: 1px solid var(--line);
  overflow: hidden;
  background: #050505;
  aspect-ratio: 16 / 9;
}

.yrw-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yrw-hero__body {
  min-width: 0;
}

.yrw-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.yrw-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.yrw-lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.yrw-actions {
  max-width: 24rem;
}

.yrw-tool {
  padding-top: 1.25rem;
}

.yrw-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.yrw-search {
  display: grid;
  gap: 0.35rem;
}

.yrw-search label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.yrw-search input {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0b0b;
  color: var(--text);
  font: inherit;
}

.yrw-search input:focus {
  outline: 2px solid rgba(201, 168, 108, 0.38);
  outline-offset: 2px;
}

.yrw-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.yrw-tabs button {
  min-height: 2.45rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0b0b;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.yrw-tabs button[aria-pressed="true"] {
  border-color: rgba(201, 168, 108, 0.72);
  background: #17130c;
  color: var(--text);
}

.yrw-status {
  min-height: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.yrw-panel {
  display: grid;
  gap: 1rem;
}

.yrw-section {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.yrw-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.yrw-section h2,
.yrw-section h3 {
  margin: 0 0 0.65rem;
  letter-spacing: 0;
}

.yrw-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.yrw-section h3 {
  font-size: 1rem;
}

.yrw-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.yrw-metric {
  min-height: 4.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0a0a;
}

.yrw-metric strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
}

.yrw-metric span {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.yrw-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
}

.yrw-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
}

.yrw-table th,
.yrw-table td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.yrw-table th {
  color: var(--text-muted);
  background: #0d0d0d;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yrw-table tr:last-child td {
  border-bottom: 0;
}

.yrw-id {
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.yrw-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.yrw-entity-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.yrw-entity-link:hover,
.yrw-entity-link:focus-visible {
  color: var(--accent);
}

.yrw-pill--link {
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.yrw-pill--link:hover,
.yrw-pill--link:focus-visible {
  border-color: rgba(201, 168, 108, 0.72);
  background: #17130c;
  color: var(--text);
}

.yrw-muted {
  color: var(--text-muted);
}

.yrw-list {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.yrw-callout {
  padding: 0.85rem;
  border: 1px solid rgba(79, 195, 247, 0.35);
  border-radius: 8px;
  background: rgba(79, 195, 247, 0.08);
  color: var(--text-muted);
}

.yrw-callout a {
  overflow-wrap: anywhere;
}

.yrw-detail-head {
  display: grid;
  gap: 0.25rem;
}

.yrw-detail-head h2 {
  margin-bottom: 0;
}

.yrw-back-link {
  width: fit-content;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.yrw-back-link:hover,
.yrw-back-link:focus-visible {
  color: var(--accent);
}

@media (max-width: 820px) {
  .yrw-hero,
  .yrw-toolbar {
    grid-template-columns: 1fr;
  }

  .yrw-tabs {
    justify-content: flex-start;
  }

  .yrw-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .yrw-main {
    padding-top: 0.75rem;
  }

  .yrw-summary {
    grid-template-columns: 1fr;
  }

  .yrw-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yrw-tabs button {
    width: 100%;
  }
}
