.themes-shell,
.theme-detail {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0 96px;
}

.themes-hero {
  max-width: 850px;
  margin-bottom: 72px;
}

.themes-hero h1,
.theme-detail__hero h1 {
  max-width: 900px;
}

.section-label {
  margin-bottom: 12px;
  color: var(--color-blue);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.themes-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.themes-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.themes-heading > p {
  margin: 0 0 7px;
  color: var(--color-muted);
  font-size: 0.84rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.theme-card,
.theme-empty {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
}

.theme-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 42px;
  color: var(--color-green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.theme-card__meta span:last-child {
  color: #8a96a6;
}

.theme-card h3,
.theme-empty h3 {
  margin-bottom: 16px;
  font-size: 1.55rem;
  line-height: 1.05;
}

.theme-card h3 a {
  color: var(--color-ink);
  text-decoration: none;
}

.theme-card__question {
  color: #24384d;
  font-weight: 700;
}

.theme-card > p:not(.theme-card__question) {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.theme-card__action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--color-ink);
  font-weight: 780;
  text-decoration: none;
}

.themes-principle {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 36px;
  margin-top: 64px;
  padding: 26px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.themes-principle p {
  max-width: 720px;
  margin: 0;
  color: var(--color-muted);
}

.theme-detail {
  max-width: 980px;
}

.theme-detail > .back-link {
  display: inline-block;
  margin-bottom: 46px;
}

.theme-detail__hero {
  max-width: 820px;
  padding-bottom: 64px;
}

.theme-detail__question {
  max-width: 800px;
  margin-bottom: 22px;
  color: #173653;
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.theme-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px;
  padding: 52px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.theme-detail__grid h2,
.theme-detail__method h2 {
  margin-bottom: 14px;
  font-size: 1.5rem;
}

.theme-detail__grid p:last-child {
  margin: 0;
  color: var(--color-muted);
}

.theme-detail__method {
  padding-top: 62px;
}

.theme-detail__method ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  counter-reset: theme-method;
  list-style: none;
}

.theme-detail__method li {
  min-height: 170px;
  padding: 26px;
  border: 1px solid var(--color-border);
  counter-increment: theme-method;
}

.theme-detail__method li + li {
  border-left: 0;
}

.theme-detail__method li::before {
  display: block;
  margin-bottom: 28px;
  color: var(--color-blue);
  font-weight: 800;
  content: "0" counter(theme-method);
}

.theme-detail__method strong,
.theme-detail__method span {
  display: block;
}

.theme-detail__method span {
  margin-top: 7px;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.theme-state-note {
  display: inline-block;
  padding: 12px 15px;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

@media (max-width: 820px) {
  .themes-shell,
  .theme-detail {
    width: min(100% - 28px, 100%);
    padding: 46px 0 66px;
  }

  .themes-hero {
    margin-bottom: 50px;
  }

  .themes-heading {
    display: block;
  }

  .themes-heading > p {
    margin-top: 8px;
  }

  .theme-grid,
  .theme-detail__grid,
  .theme-detail__method ol {
    grid-template-columns: 1fr;
  }

  .theme-card {
    min-height: 0;
  }

  .theme-card__meta {
    margin-bottom: 28px;
  }

  .themes-principle {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .theme-detail__grid {
    gap: 36px;
  }

  .theme-detail__method li + li {
    border-top: 0;
    border-left: 1px solid var(--color-border);
  }
}
