.md-grid {
  max-width: 92rem;
}

/* Public experiment dashboard: card-first layout keeps long metric names out
   of the main reading path while retaining every raw value in details. */
.ar-dashboard {
  --ar-dashboard-line: var(--md-default-fg-color--lightest);
  margin-top: 1.6rem;
}

.ar-dashboard__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.ar-dashboard__summary article,
.ar-dashboard-card {
  border: 0.05rem solid var(--ar-dashboard-line);
  border-radius: 0.7rem;
  background: var(--md-default-bg-color);
  box-shadow: 0 0.35rem 1.1rem color-mix(in srgb, var(--md-default-fg-color) 7%, transparent);
}

.ar-dashboard__summary article {
  padding: 0.8rem 0.9rem;
}

.ar-dashboard__summary strong {
  display: block;
  color: var(--md-primary-fg-color);
  font-size: 1.35rem;
}

.ar-dashboard__summary span,
.ar-dashboard__status {
  color: var(--md-default-fg-color--light);
  font-size: 0.72rem;
}

.ar-dashboard__controls {
  position: sticky;
  top: 2.4rem;
  z-index: 2;
  display: flex;
  gap: 0.7rem;
  align-items: end;
  margin: 0 -0.25rem;
  padding: 0.7rem 0.25rem;
  background: color-mix(in srgb, var(--md-default-bg-color) 92%, transparent);
  backdrop-filter: blur(0.4rem);
}

.ar-dashboard__controls label {
  display: grid;
  gap: 0.2rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.68rem;
}

.ar-dashboard__controls select,
.ar-dashboard__controls input {
  min-height: 2.25rem;
  padding: 0.45rem 0.65rem;
  border: 0.05rem solid var(--ar-dashboard-line);
  border-radius: 0.45rem;
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color);
  font: inherit;
  font-size: 0.76rem;
}

.ar-dashboard__search {
  flex: 1;
}

.ar-dashboard__status {
  margin: 0.55rem 0;
}

.ar-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.ar-dashboard-card {
  min-width: 0;
  padding: 0.9rem;
}

.ar-dashboard-card header {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: flex-start;
}

.ar-dashboard-card h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ar-dashboard-card__seed {
  flex: none;
  color: var(--md-default-fg-color--light);
  font-size: 0.62rem;
}

.ar-dashboard-card__badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.7rem;
}

.ar-dashboard-card__badges span {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 10%, transparent);
  font-size: 0.6rem;
}

.ar-dashboard-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.ar-dashboard-card__evidence {
  display: flex;
  gap: 0.45rem 0.7rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin: -0.05rem 0 0.7rem;
  padding: 0.5rem 0.6rem;
  border-left: 0.16rem solid var(--md-accent-fg-color);
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--md-accent-fg-color) 8%, transparent);
}

.ar-dashboard-card__evidence strong {
  color: var(--md-accent-fg-color);
  font-size: 0.68rem;
}

.ar-dashboard-card__evidence--capability {
  border-left-color: #16865c;
  background: color-mix(in srgb, #16865c 9%, transparent);
}

.ar-dashboard-card__evidence--capability strong {
  color: #16865c;
}

.ar-dashboard-card__evidence span,
.ar-dashboard-card__notice {
  color: var(--md-default-fg-color--light);
  font-size: 0.6rem;
}

.ar-dashboard-card__notice {
  margin: 0.55rem 0 0;
  line-height: 1.45;
}

.ar-dashboard-card__metrics > div {
  min-width: 0;
  padding: 0.48rem;
  border-radius: 0.45rem;
  background: var(--md-code-bg-color);
}

.ar-dashboard-card__metrics strong,
.ar-dashboard-card__metrics span {
  display: block;
}

.ar-dashboard-card__metrics strong {
  font-size: 0.82rem;
}

.ar-dashboard-card__metrics span {
  color: var(--md-default-fg-color--light);
  font-size: 0.55rem;
  overflow-wrap: anywhere;
}

.ar-dashboard-card details {
  margin-top: 0.65rem;
}

.ar-dashboard-card summary {
  color: var(--md-primary-fg-color);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.ar-dashboard-card__all {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 0.65rem;
  margin-top: 0.45rem;
}

.ar-dashboard-card__all > div {
  display: flex;
  gap: 0.45rem;
  justify-content: space-between;
  padding-bottom: 0.15rem;
  border-bottom: 0.05rem dashed var(--ar-dashboard-line);
  font-size: 0.55rem;
  overflow-wrap: anywhere;
}

.ar-dashboard-card__source {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
}

.ar-dashboard__more {
  display: block;
  margin: 1rem auto 0;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 0.45rem;
  color: var(--md-primary-bg-color);
  background: var(--md-primary-fg-color);
  font-weight: 700;
  cursor: pointer;
}

@media screen and (max-width: 60rem) {
  .ar-dashboard__grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 44.984rem) {
  .ar-dashboard__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ar-dashboard__controls {
    position: static;
    display: grid;
  }

  .ar-dashboard-card__metrics,
  .ar-dashboard-card__all {
    grid-template-columns: 1fr;
  }
}

.md-typeset .arithmatex,
.md-typeset .mermaid,
.md-typeset__scrollwrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.md-typeset .arithmatex {
  padding: 0.4rem 0;
}

.md-typeset .mermaid {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 0.05rem solid var(--md-default-fg-color--lightest);
  border-radius: 0.35rem;
  background: var(--md-default-bg-color);
}

.md-typeset .mermaid svg {
  min-width: max-content;
}

.md-typeset table:not([class]) {
  display: table;
  width: max-content;
  min-width: 100%;
}

/* Compact paper catalogs must keep every metadata column visible without a
   horizontal scroll. Long English titles and affiliations may wrap freely. */
.md-typeset .ar-method-index .md-typeset__scrollwrap {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
  overflow-x: visible;
}

.md-typeset .ar-method-index .md-typeset__table {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.md-typeset .ar-method-index table:not([class]) {
  display: table;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.md-typeset .ar-method-index th,
.md-typeset .ar-method-index td {
  min-width: 0;
  padding: 0.7rem 0.6rem;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.md-typeset .ar-method-index a,
.md-typeset .ar-method-index code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.md-typeset .ar-method-index th:nth-child(1) {
  width: 12%;
}

.md-typeset .ar-method-index th:nth-child(2) {
  width: 36%;
}

.md-typeset .ar-method-index th:nth-child(3) {
  width: 25%;
}

.md-typeset .ar-method-index th:nth-child(4) {
  width: 17%;
}

.md-typeset .ar-method-index th:nth-child(5) {
  width: 10%;
}

@media screen and (max-width: 60rem) {
  .md-typeset .ar-method-index table:not([class]) {
    font-size: 0.68rem;
  }

  .md-typeset .ar-method-index th,
  .md-typeset .ar-method-index td {
    padding: 0.5rem 0.35rem;
  }
}

@media screen and (max-width: 44.984rem) {
  .md-typeset .ar-method-index table:not([class]),
  .md-typeset .ar-method-index tbody,
  .md-typeset .ar-method-index tr,
  .md-typeset .ar-method-index td {
    display: block;
    width: 100%;
  }

  .md-typeset .ar-method-index thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .md-typeset .ar-method-index tr {
    margin: 0 0 0.8rem;
    padding: 0.25rem 0;
    border: 0.05rem solid var(--md-default-fg-color--lightest);
    border-radius: 0.35rem;
  }

  .md-typeset .ar-method-index td {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.6rem;
    border-bottom: 0.05rem solid var(--md-default-fg-color--lightest);
  }

  .md-typeset .ar-method-index td:last-child {
    border-bottom: 0;
  }

  .md-typeset .ar-method-index td::before {
    color: var(--md-default-fg-color--light);
    font-weight: 700;
  }

  .md-typeset .ar-method-index td:nth-child(1)::before {
    content: "方向";
  }

  .md-typeset .ar-method-index td:nth-child(2)::before {
    content: "方法";
  }

  .md-typeset .ar-method-index td:nth-child(3)::before {
    content: "机构与日期";
  }

  .md-typeset .ar-method-index td:nth-child(4)::before {
    content: "原作者代码";
  }

  .md-typeset .ar-method-index td:nth-child(5)::before {
    content: "本地入口";
  }
}

.ar-hero {
  margin: -0.6rem 0 2.4rem;
  padding: 3.2rem clamp(1.4rem, 5vw, 4.4rem);
  border: 0.05rem solid var(--md-default-fg-color--lightest);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--md-primary-fg-color) 20%, transparent) 0, transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--md-primary-fg-color) 10%, var(--md-default-bg-color)), var(--md-default-bg-color));
}

.ar-hero h1 {
  margin: 0.25rem 0 0.8rem;
  font-size: clamp(2.3rem, 7vw, 4.6rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.ar-hero > p:not(.ar-actions) {
  max-width: 43rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.ar-eyebrow {
  color: var(--md-primary-fg-color);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.ar-capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2.5rem;
}

.ar-capability-card {
  position: relative;
  padding: 1.35rem 1.45rem 1.25rem;
  overflow: hidden;
  border: 0.05rem solid var(--md-default-fg-color--lightest);
  border-radius: 0.8rem;
  background: var(--md-default-bg-color);
  box-shadow: 0 0.35rem 1.2rem color-mix(in srgb, var(--md-default-fg-color) 7%, transparent);
}

.ar-capability-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  content: "";
  background: var(--md-primary-fg-color);
}

.ar-card-reproduction::before {
  background: var(--md-accent-fg-color);
}

.ar-capability-card h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

.ar-capability-card ul {
  min-height: 6.4rem;
}

.ar-capability-card > p:last-child {
  margin-bottom: 0;
  font-weight: 650;
}

.ar-domain-matrix {
  margin: 1rem 0 1.2rem;
  overflow-x: auto;
  border: 0.05rem solid var(--md-default-fg-color--lightest);
  border-radius: 0.8rem;
  box-shadow: 0 0.35rem 1.2rem color-mix(in srgb, var(--md-default-fg-color) 5%, transparent);
}

.md-typeset .ar-domain-matrix table:not([class]) {
  margin: 0;
  border: 0;
}

.md-typeset .ar-domain-matrix th {
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--md-primary-fg-color) 9%, var(--md-default-bg-color));
  font-size: 0.72rem;
  letter-spacing: 0.025em;
}

.md-typeset .ar-domain-matrix td {
  min-width: 18rem;
  padding: 1rem;
  vertical-align: top;
  line-height: 1.65;
}

.md-typeset .ar-domain-matrix td:first-child {
  min-width: 9rem;
  color: var(--md-primary-fg-color);
  font-size: 0.83rem;
}

.ar-status {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
}

.ar-status-ready {
  color: #087f5b;
  background: color-mix(in srgb, #20c997 16%, transparent);
}

.ar-status-building {
  color: #a15c00;
  background: color-mix(in srgb, #f59f00 17%, transparent);
}

.ar-status-open {
  color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 12%, transparent);
}

.ar-start-grid {
  padding: 0.4rem 1.2rem;
  border-left: 0.18rem solid var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 5%, transparent);
}

@media screen and (max-width: 48rem) {
  .ar-hero {
    padding: 2rem 1.3rem;
  }

  .ar-capability-grid {
    grid-template-columns: 1fr;
  }

  .ar-capability-card ul {
    min-height: 0;
  }

  .md-typeset .ar-domain-matrix td {
    min-width: 15rem;
  }
}
