.torres-page {
  overflow: hidden;
}

.torres-page .section {
  position: relative;
}

.torres-hero__grid,
.torres-feature__grid,
.torres-barracks__grid,
.torres-mages__grid,
.torres-artillery__opening,
.torres-artillery__lower {
  display: grid;
  min-width: 0;
}

.torres-hero__grid {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--space-6);
}

.torres-hero__copy {
  min-width: 0;
  max-width: 35.625rem;
}

.torres-ribbon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-inline-start: 3px solid var(--color-gold);
  background: var(--color-forest);
  color: var(--color-parchment);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: var(--line-meta);
  text-transform: uppercase;
}

.torres-ribbon span { color: var(--color-gold); }

.torres-hero__copy .lead {
  max-width: 34rem;
}

.torres-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
}

.torres-hero__note {
  max-width: 30rem;
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-caption);
  line-height: var(--line-caption);
}

.torres-hero__figure {
  width: 100%;
  min-width: 0;
  margin: 0;
  border-color: var(--color-gold);
}

.torres-hero__figure img {
  width: 100%;
  min-height: 21rem;
  object-fit: cover;
  object-position: 68% center;
}

.torres-categories__intro {
  width: min(100%, 42rem);
  min-width: 0;
}

.torres-categories__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  min-width: 0;
}

.torres-category {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--color-earth);
  border-top: 4px solid var(--category-color, var(--color-forest));
  border-radius: var(--radius-card);
  background: var(--color-parchment-light);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.torres-category:hover {
  border-color: var(--color-gold);
  box-shadow: 0 4px 12px rgb(45 36 27 / 20%);
}

.torres-category--archers { --category-color: var(--color-forest); }
.torres-category--barracks { --category-color: var(--color-flag-red); }
.torres-category--mages { --category-color: var(--color-royal-blue); }
.torres-category--artillery { --category-color: var(--color-gold); }

.torres-category__icon {
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  border: 1px solid var(--category-color);
  border-radius: 50%;
  background: var(--color-parchment);
  color: var(--category-color);
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.torres-category__content { min-width: 0; }
.torres-category h3 { margin-block-end: var(--space-2); font-size: var(--text-subtitle); }
.torres-category p { margin: 0; }

.torres-decision__intro {
  width: min(100%, 43rem);
  min-width: 0;
}

.torres-table-hint { display: none; }
.torres-table-scroll { min-width: 0; }

.torres-decision__cards { display: none; }

.torres-rule {
  width: min(100%, 35rem);
  min-width: 0;
  margin-block-start: var(--space-6);
  padding: var(--space-5);
  border: 2px solid var(--color-gold);
  border-inline-start-width: 5px;
  background: var(--color-parchment-light);
}

.torres-rule h3 { margin-block-end: var(--space-2); }
.torres-rule p { margin: 0; }

.torres-feature__grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--space-6);
}

.torres-feature__copy { min-width: 0; max-width: 41.25rem; }
.torres-feature__copy > h3 { margin-block-start: var(--space-5); font-size: var(--text-subtitle); }

.torres-feature__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: min(100%, 31.25rem);
  min-width: 0;
  margin-block: var(--space-5);
}

.torres-feature__list p { margin: 0; }

.torres-tip,
.torres-mages__tip {
  width: min(100%, 34rem);
  padding: var(--space-4);
  border-inline-start: 4px solid var(--color-forest);
  background: var(--color-parchment-light);
}

.torres-feature__figure {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.torres-feature__figure img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.torres-barracks {
  background: var(--color-forest-deep);
  color: var(--color-parchment-light);
}

.torres-barracks h2,
.torres-barracks h3,
.torres-barracks .eyebrow { color: var(--color-parchment-light); }
.torres-barracks .eyebrow { color: var(--color-gold); }

.torres-barracks__grid {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  align-items: center;
  gap: var(--space-6);
}

.torres-barracks__copy { min-width: 0; max-width: 40rem; }
.torres-barracks__copy > h3 { margin-block-start: var(--space-5); font-size: var(--text-subtitle); }

.torres-barracks__panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  min-width: 0;
  margin-block: var(--space-5);
}

.torres-barracks__panels article {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid rgb(242 229 202 / 45%);
  background: rgb(255 248 234 / 8%);
}

.torres-barracks__panels h3 { margin-block-end: var(--space-2); font-size: var(--text-lead); }
.torres-barracks__panels p { margin: 0; }

.torres-barracks__note {
  width: min(100%, 36rem);
  padding: var(--space-4);
  border: 2px solid var(--color-gold);
  color: var(--color-parchment-light);
}

.torres-barracks__figure { width: 100%; min-width: 0; margin: 0; border-color: var(--color-gold); }
.torres-barracks__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.torres-barracks figcaption { color: var(--color-parchment); }

.torres-mages__grid {
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: center;
  gap: var(--space-6);
}

.torres-mages__art {
  display: grid;
  min-width: 0;
  min-height: 30rem;
  place-items: center;
  align-content: center;
  gap: var(--space-3);
  border: 2px solid var(--color-royal-blue);
  border-radius: var(--radius-illustration);
  background: #dce6e7;
  color: var(--color-royal-blue);
}

.torres-mages__rune { font-size: 3.5rem; line-height: 1; }
.torres-mages__tower { width: 7rem; height: 14rem; border: 4px solid var(--color-royal-blue); border-radius: 3.5rem 3.5rem .5rem .5rem; background: var(--color-parchment-light); }
.torres-mages__art p { margin: 0; font-size: var(--text-caption); font-weight: 600; }

.torres-mages__copy { min-width: 0; max-width: 42.5rem; }
.torres-mages__copy > h3 { margin-block-start: var(--space-5); font-size: var(--text-subtitle); }

.torres-mages__notes {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: min(100%, 32.5rem);
  min-width: 0;
  margin-block: var(--space-5);
  padding-inline-start: var(--space-4);
  border-inline-start: 4px solid var(--color-royal-blue);
}

.torres-mages__notes p { margin: 0; }
.torres-mages__tip { border-inline-start-color: var(--color-royal-blue); }

.torres-artillery__opening {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--space-6);
}

.torres-artillery__copy { min-width: 0; max-width: 40.625rem; }
.torres-artillery__copy > h3 { margin-block-start: var(--space-5); font-size: var(--text-subtitle); }

.torres-artillery__art {
  display: grid;
  min-width: 0;
  min-height: 19rem;
  place-items: center;
  align-content: center;
  gap: var(--space-3);
  border: 2px solid var(--color-earth);
  border-radius: var(--radius-illustration);
  background: #e9d4a8;
  color: var(--color-flag-red);
}

.torres-artillery__burst { font-size: 3rem; color: var(--color-gold); }
.torres-artillery__bastion { font-size: 6rem; line-height: 1; color: var(--color-earth); }
.torres-artillery__art p { margin: 0; color: var(--color-earth); font-size: var(--text-caption); font-weight: 600; }

.torres-artillery__lower {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  align-items: stretch;
  gap: var(--space-6);
  margin-block-start: var(--space-6);
}

.torres-road-diagram {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 16rem;
  overflow: hidden;
  border: 2px solid var(--color-earth);
  border-radius: var(--radius-illustration);
  background: #d9e1c1;
}

.torres-road-diagram__road {
  position: absolute;
  inset: 0;
  width: 55%;
  margin-inline: auto;
  transform: skewX(-17deg);
  background: var(--color-parchment);
  border-inline: 2px dashed var(--color-earth);
}

.torres-road-diagram__hold,
.torres-road-diagram__area {
  position: absolute;
  z-index: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-earth);
  background: var(--color-parchment-light);
  color: var(--color-ink);
  font-size: var(--text-caption);
  font-weight: 700;
}

.torres-road-diagram__hold { right: 16%; bottom: 18%; border-color: var(--color-flag-red); }
.torres-road-diagram__area { top: 18%; left: 12%; border-color: var(--color-gold); }

.torres-artillery__note {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--color-earth);
  border-top: 4px solid var(--color-gold);
  background: var(--color-parchment-light);
}

.torres-artillery__note h3 { font-size: var(--text-subtitle); }
.torres-artillery__note p { margin: 0; }

.torres-specializations__intro { width: min(100%, 41.875rem); min-width: 0; }

.torres-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
  margin-block: var(--space-6);
  border-block-end: 1px solid var(--color-earth);
}

.torres-tabs > button {
  min-width: 0;
  min-height: 2.75rem;
  padding: .625rem 1rem;
  border: 1px solid var(--color-earth);
  border-block-end: 4px solid transparent;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--color-parchment-light);
  color: var(--color-earth);
  font-size: var(--text-body);
  font-weight: 700;
}

.torres-tabs > button[aria-selected="true"] {
  border-color: var(--color-forest);
  border-block-end-color: var(--color-gold);
  background: var(--color-forest);
  color: var(--color-parchment-light);
}

.torres-tab-panel { min-width: 0; }
.torres-tab-panel[hidden] { display: none; }
.torres-tab-panel.is-switching { animation: torres-panel-in var(--transition-content) both; }

@keyframes torres-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.torres-specialization-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  min-width: 0;
}

.torres-specialization {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-card);
  background: var(--color-parchment-light);
  box-shadow: var(--shadow-card);
}

.torres-specialization__seal {
  display: grid;
  width: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  place-items: center;
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  background: var(--color-parchment);
  color: var(--color-earth);
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.torres-specialization .badge { margin-block-end: var(--space-2); }
.torres-specialization h3 { margin-block-end: var(--space-3); font-size: var(--text-subtitle); }
.torres-specialization p { margin-block-end: var(--space-3); }
.torres-specialization p:last-child { margin-block-end: 0; }

.torres-roadmap__intro { width: min(100%, 40rem); min-width: 0; }

.torres-roadmap__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  min-width: 0;
}

.torres-roadmap__steps article {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4);
  border-top: 2px solid var(--color-earth);
}

.torres-roadmap__steps h3 { margin: 0 0 var(--space-2); font-size: var(--text-subtitle); }
.torres-roadmap__steps p { margin: 0; }

.torres-step-number {
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  border: 1px solid var(--color-ink);
  border-radius: 50%;
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: 1.375rem;
}

.torres-step-number--gold { background: var(--color-gold); }
.torres-step-number--red { background: var(--color-flag-red); color: var(--color-parchment-light); border-color: var(--color-flag-red); }
.torres-step-number--forest { background: var(--color-forest); color: var(--color-parchment-light); border-color: var(--color-forest); }
.torres-step-number--blue { background: var(--color-royal-blue); color: var(--color-parchment-light); border-color: var(--color-royal-blue); }

.torres-next__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  min-width: 0;
  padding: var(--space-7);
  border: 3px solid var(--color-gold);
  background: var(--color-forest-deep);
  color: var(--color-parchment-light);
}

.torres-next__copy { width: min(100%, 38.75rem); min-width: 0; }
.torres-next__copy h2 { color: var(--color-parchment-light); }
.torres-next__copy .eyebrow { color: var(--color-gold); }
.torres-next__copy p { margin: 0; }

.torres-next__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-3);
  min-width: 0;
}

.torres-next__actions > * { min-width: 0; }
.torres-next__guide { border-color: var(--color-parchment); color: var(--color-parchment-light); }
.torres-next__guide:hover { background: var(--color-parchment-light); color: var(--color-forest-deep); }

@media (max-width: 61.25rem) {
  .torres-categories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .torres-roadmap__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 60rem) {
  .torres-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .torres-hero__figure img { min-height: 18rem; }
  .torres-barracks__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

@media (max-width: 56.25rem) {
  .torres-table-hint { display: block; margin-block-end: var(--space-2); color: var(--color-earth); font-size: var(--text-caption); font-weight: 600; }
}

@media (max-width: 53.75rem) {
  .torres-feature__grid,
  .torres-mages__grid,
  .torres-artillery__opening { grid-template-columns: 1fr; }
  .torres-feature__figure { max-width: 27.5rem; }
  .torres-mages__art { order: 2; min-height: 20rem; max-width: 27.5rem; }
  .torres-artillery__art { min-height: 15rem; max-width: 32rem; }
}

@media (max-width: 47.5rem) {
  .torres-specialization-grid { grid-template-columns: 1fr; }
  .torres-next__actions { width: 100%; }
}

@media (max-width: 45rem) {
  .torres-hero__grid,
  .torres-barracks__grid,
  .torres-artillery__lower { grid-template-columns: 1fr; }
  .torres-hero__figure { order: 2; }
  .torres-hero__figure img { min-height: 0; aspect-ratio: 16 / 10; object-position: 62% center; }
  .torres-hero__copy .lead { max-width: 34rem; font-size: 1.0625rem; line-height: 1.588; }
  .torres-feature__figure { justify-self: center; }
  .torres-barracks__figure { order: 2; max-width: 28rem; }
  .torres-decision__cards { display: grid; grid-template-columns: 1fr; gap: var(--space-4); min-width: 0; }
  .torres-table-scroll { display: none; }
  .torres-decision__cards article { min-width: 0; padding: var(--space-4); border: 1px solid var(--color-earth); background: var(--color-parchment-light); }
  .torres-decision__cards h3 { font-size: var(--text-subtitle); }
  .torres-decision__cards dl { margin: 0; display: grid; gap: var(--space-2); }
  .torres-decision__cards dd { margin: 0; }
  .torres-barracks__panels { grid-template-columns: 1fr; }
  .torres-tabs { flex-wrap: nowrap; overflow-x: auto; padding-block-end: var(--space-2); scrollbar-color: var(--color-earth) transparent; }
  .torres-tabs > button { flex: 0 0 auto; }
  .torres-roadmap__steps { grid-template-columns: 1fr; gap: 0; }
  .torres-roadmap__steps article { grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--space-3); border-top: 0; border-inline-start: 2px solid var(--color-earth); }
  .torres-next__panel { padding: var(--space-5) var(--space-4); }
  .torres-next__actions > .button { width: 100%; justify-content: flex-start; }
}

@media (max-width: 30rem) {
  .torres-categories__grid { grid-template-columns: 1fr; }
  .torres-category { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .torres-category__content { align-self: center; }
  .torres-specialization { padding: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .torres-tab-panel.is-switching { animation: none; }
}
