.copy-mobile {
  display: none;
}

.copy-desktop,
.copy-mobile {
  text-wrap: pretty;
}

.keep-together {
  white-space: nowrap;
}

.sidebar__brand a {
  font-size: 0;
}

.sidebar__brand a::after {
  content: "Yudai Tanaka's";
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.page-title-ja {
  margin: 16px 0 0;
  color: var(--color-muted-light);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.architecture-grid,
.detail-list {
  display: grid;
  border-left: 0;
  grid-template-columns: 1fr;
}

.architecture-flow,
.architecture-flow--five {
  display: grid;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  list-style: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.architecture-flow--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.architecture-card {
  display: grid;
  min-height: auto;
  padding: 24px 0;
  border-right: 0;
  background: transparent;
  grid-template-columns: 54px 64px minmax(180px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.architecture-flow li {
  position: relative;
  display: grid;
  min-height: 190px;
  padding: 22px 18px;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
}

.architecture-flow li:last-child,
.architecture-flow--five li:last-child {
  border-right: 0;
}

.architecture-flow li:not(:last-child)::after,
.architecture-flow--five li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -8px;
  z-index: 2;
  display: block;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--color-accent);
  border-right: 1px solid var(--color-accent);
  background: var(--color-surface);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.detail-list article,
.detail-list--future article {
  display: grid;
  min-height: auto;
  padding: 24px 0;
  border-right: 0;
  background: transparent;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.node-mark,
.flow-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  border: 1px solid var(--color-border);
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  place-items: center;
  align-self: center;
  justify-self: center;
}

.architecture-flow .flow-icon {
  justify-self: start;
}

.architecture-card > span,
.architecture-flow li > span {
  align-self: center;
  justify-self: start;
}

.architecture-card h3,
.architecture-flow strong,
.detail-list h3 {
  min-height: 0;
  margin: 0;
  display: block;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.45;
  align-self: center;
}

.architecture-card p,
.architecture-flow p,
.detail-list p {
  margin: 0;
  color: var(--color-accent-dark);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.78;
  align-self: center;
}

.architecture-card p span,
.architecture-flow p span,
.detail-list p span {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

@media (max-width: 899px) {
  .copy-desktop {
    display: none;
  }

  .copy-mobile {
    display: inline;
  }

  .sidebar__brand a::after {
    font-size: 0.95rem;
  }

  .page-title-ja {
    margin-top: 10px;
    font-size: 0.78rem;
  }

  .architecture-flow,
  .architecture-flow--five {
    border: 0;
    background: transparent;
    grid-template-columns: 1fr;
  }

  .architecture-card,
  .architecture-flow li {
    min-height: auto;
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    grid-template-columns: 38px 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .architecture-flow li:last-child,
  .architecture-flow--five li:last-child {
    border-bottom: 0;
  }

  .architecture-flow li:not(:last-child)::after,
  .architecture-flow--five li:not(:last-child)::after {
    top: auto;
    right: 24px;
    bottom: -7px;
    display: block;
    width: 12px;
    height: 12px;
    transform: rotate(135deg);
  }

  .detail-list article,
  .detail-list--future article {
    padding: 20px 0;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .node-mark,
  .flow-icon {
    width: 34px;
    height: 34px;
    font-size: 0.54rem;
  }

  .architecture-card h3,
  .architecture-flow strong,
  .detail-list h3 {
    font-size: 1rem;
    line-height: 1.4;
  }

  .architecture-card p,
  .architecture-flow p {
    grid-column: 3 / 4;
  }

  .architecture-card p,
  .architecture-flow p,
  .detail-list p {
    font-size: 0.88rem;
    line-height: 1.76;
  }
}

@media (max-width: 480px) {
  .architecture-card h3,
  .architecture-flow strong,
  .detail-list h3 {
    font-size: 0.98rem;
  }

  .architecture-card p,
  .architecture-flow p,
  .detail-list p {
    font-size: 0.88rem;
    line-height: 1.78;
  }
}
