:root {
  --institution-paper: #f8f7f2;
  --institution-ink: #172921;
  --institution-green: #183f31;
  --institution-accent: #853b3d;
  --institution-rule: #dcd8cd;
  --institution-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.anteci-homepage, body.academie, body.pt-page {
  background: var(--institution-paper);
  color: var(--institution-ink);
  font-family: var(--institution-font);
}

.anteci-homepage .anteci-topbar {
  background: #fff;
  border-block: 1px solid var(--institution-rule);
}

.anteci-homepage .portal-welcome {
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  gap: clamp(20px, 4vw, 58px);
  margin-block: clamp(20px, 4vw, 54px) 30px;
}

.portal-intro { padding-block: clamp(12px, 3vw, 38px); }

.anteci-homepage .portal-association {
  border-left: 3px solid var(--institution-accent);
  padding-left: 13px;
  color: var(--institution-ink);
  font-size: .9rem;
}

.anteci-homepage .portal-welcome #hero-title {
  font: 650 clamp(2.2rem, 4.2vw, 4.1rem)/1.12 var(--institution-font);
  letter-spacing: -.035em;
  color: var(--institution-ink);
  margin: .3em 0 .24em;
}

.anteci-homepage #hero-title em {
  display: inline;
  color: var(--institution-accent);
  font: inherit;
  font-style: normal;
}

.anteci-homepage .portal-intro .portal-lead { max-width: 35ch; margin: 0 0 22px; line-height: 1.55; font-size: 1.08rem; }
.portal-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.portal-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 9px 15px;
  border: 1px solid var(--institution-green);
  border-radius: 3px;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  font-weight: 700;
}
.anteci-homepage .portal-hero-actions .portal-hero-primary { color: white; background: var(--institution-green); }
.anteci-homepage .portal-hero-actions .portal-hero-secondary { color: var(--institution-green); background: white; }
.portal-hero-primary:hover { background: #275844; }
.portal-hero-secondary:hover { background: #edf2ed; }
.portal-hero-actions a:focus-visible { outline: 3px solid var(--institution-accent); outline-offset: 3px; }

.anteci-homepage .portal-cover { min-height: 340px; border-radius: 4px; }
.anteci-homepage .portal-cover figcaption { padding-inline: clamp(16px, 3vw, 34px); }
.anteci-homepage .portal-cover figcaption strong { font-family: var(--institution-font); }

.anteci-homepage .portal-pathways {
  border-top: 1px solid var(--institution-rule);
  margin-block: 0 28px;
  padding-top: 20px;
}
.anteci-homepage .portal-pathways .portal-actions {
  max-width: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.anteci-homepage .portal-pathways .portal-actions a {
  border-radius: 4px;
  min-height: 62px;
  border-color: var(--institution-rule);
  padding: 7px 9px;
}
.anteci-homepage .portal-pathways .portal-actions a.portal-partner {
  grid-column: span 2;
  border-color: var(--institution-green);
  border-left: 4px solid #d6b277;
}
.anteci-homepage .portal-pathways .portal-actions a:not(.portal-partner):hover { border-color: var(--institution-green); }
.anteci-homepage .portal-pathways .portal-lesson { max-width: none; margin-top: 14px; }
.anteci-homepage .portal-section-head h2,
.anteci-homepage .portal-shop h2,
.anteci-homepage .portal-event #home-daloa h2 {
  font-family: var(--institution-font);
  font-weight: 600;
  letter-spacing: -.02em;
}
.anteci-homepage .portal-shop { background: white; border-color: var(--institution-rule); }

body.academie .academy-head, body.pt-page .pt-hero {
  border-top: 4px solid var(--institution-accent);
  border-radius: 4px;
}
body.academie .academy-head h1, body.academie legend,
body.pt-page .pt-hero h1, body.pt-page .pt-box h2, body.pt-page .pt-plan legend {
  font-family: var(--institution-font);
  font-weight: 600;
  letter-spacing: -.02em;
}
body.academie .academy-panel, body.pt-page .pt-box {
  border-radius: 5px;
  border-color: var(--institution-rule);
}

@media (max-width: 800px) {
  .anteci-homepage .portal-pathways .portal-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .anteci-homepage .portal-welcome { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .portal-intro { padding: 0; }
  .anteci-homepage .portal-cover { min-height: 0; height: clamp(170px, 48vw, 300px); }
}
@media (max-width: 440px) {
  .portal-hero-actions a { flex: 1 1 100%; }
  .anteci-homepage .portal-pathways .portal-actions a { font-size: .93rem; }
}

@media screen {
  body.institution-ticket {
    background: var(--institution-paper);
    color: var(--institution-ink);
    font-family: var(--institution-font);
  }
  .institution-ticket main {
    border-color: var(--institution-rule);
    border-top: 4px solid var(--institution-accent);
    border-radius: 5px;
  }
  .institution-ticket h1 { font-family: var(--institution-font); font-weight: 600; }
  .institution-ticket #recoveryPanel { border-color: var(--institution-rule); border-radius: 5px; }
}

.anteci-homepage .portal-partner strong,
.anteci-homepage .portal-lesson h2,
.anteci-homepage .portal-lesson-meta,
.anteci-homepage .directory-group-heading h3,
.anteci-homepage :is(button, input, select, textarea) {
  font-family: var(--institution-font);
}

/* Public routes share a typeface while retaining their local layouts and colors. */
body[data-anteci-public],
[data-anteci-public] :is(.anteci-topbar, .anteci-ticker, .anteci-leaders, .anteci-information),
[data-anteci-public] :is(.anteci-news-dialog, .anteci-leaders-dialog, .information-dialog) {
  font-family: var(--institution-font);
}

[data-anteci-public] :is(h1, h2, h3, legend, button, input, select, textarea) {
  font-family: var(--institution-font) !important;
}
