.section-hub-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.section-hub-page > footer {
  margin-block-start: auto;
}

.section-hub {
  padding-block: clamp(30px, 6vw, 80px);
}

.section-hub h1 {
  margin: 0 0 clamp(18px, 4vw, 32px);
  color: var(--green);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
}

.section-hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(12px, 2vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-hub-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 8px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf7;
}

.section-hub-card:is(:hover, :focus-visible) {
  border-color: var(--student-sage-border);
  background: #f0f4eb;
}

.section-hub-card:focus-visible {
  outline: 3px solid #8d723e;
  outline-offset: 3px;
}

.section-hub-card h2 {
  margin: 0;
  color: var(--student-action);
  font: 650 clamp(1.45rem, 3vw, 2rem)/1.2 var(--serif);
}

.section-hub-card p {
  margin: 0;
  color: #4f6653;
}

.section-hub .weekly-puzzle {
  margin-block: clamp(18px, 3vw, 32px) 0;
}

.section-hub .weekly-puzzle-card .button {
  gap: 10px;
}

.section-hub--overview {
  padding-block: clamp(22px, 4vw, 52px);
}

.overview-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-block-end: clamp(16px, 2.5vw, 26px);
  padding: clamp(20px, 3.5vw, 42px);
  border: 1px solid #c2d1b6;
  border-radius: 18px;
  background: linear-gradient(110deg, #edf3e7 18%, #dce9d1);
}

.overview-banner::after {
  position: absolute;
  z-index: -1;
  inset-block-start: -45%;
  inset-inline-end: clamp(0px, 5vw, 76px);
  inline-size: clamp(9rem, 24vw, 17rem);
  aspect-ratio: 1;
  border: 1px solid #8ba58155;
  border-radius: 50%;
  box-shadow: 0 0 0 16px #8ba58120, 0 0 0 36px #8ba58113;
  content: "";
  pointer-events: none;
}

.overview-banner h1 {
  width: auto;
  margin: 0;
  color: var(--green);
  font-size: calc(clamp(2.3rem, 5.5vw, 3.75rem) + var(--site-font-increase, 0px));
  line-height: 1.08;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
}

.overview-banner p {
  max-width: 48ch;
  margin: .75rem 0 0;
  color: #385642;
  font-size: calc(1rem + var(--site-font-increase, 0px));
  line-height: 1.55;
}

.tone-sage {
  --overview-surface: #e8f0e2;
  --overview-edge: #c3d2ba;
  --overview-accent: #789561;
  --overview-hover: #e0ecd8;
}

.tone-parchment {
  --overview-surface: #f6ebd7;
  --overview-edge: #dac6a0;
  --overview-accent: #b18b52;
  --overview-hover: #f0e2c6;
}

.tone-eucalyptus {
  --overview-surface: #e2eeeb;
  --overview-edge: #b6d0c8;
  --overview-accent: #6f9b92;
  --overview-hover: #d7e9e4;
}

.tone-terracotta {
  --overview-surface: #f7e4dd;
  --overview-edge: #dfbdb0;
  --overview-accent: #a97362;
  --overview-hover: #f1d9cf;
}

.overview-panel {
  border: 1px solid var(--overview-edge);
  border-block-start: 3px solid var(--overview-accent);
  border-radius: 15px;
  background: var(--overview-surface);
  box-shadow: 0 5px 14px #203a2b0b;
}

.section-hub-card.overview-panel {
  gap: .6rem;
  min-block-size: 9.5rem;
  padding: clamp(20px, 3vw, 32px);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.section-hub-card.overview-panel:is(:hover, :focus-visible) {
  border-color: var(--overview-accent);
  background: var(--overview-hover);
  box-shadow: 0 7px 18px #203a2b16;
}

.section-hub-card.overview-panel:is(:hover, :focus-visible) h2 {
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .18em;
}

.section-hub-card.overview-panel h2 {
  color: var(--green);
  letter-spacing: -.025em;
}

.section-hub-card.overview-panel p {
  max-width: 52ch;
  color: #395341;
  font-size: calc(1rem + var(--site-font-increase, 0px));
  line-height: 1.6;
}

.lab-quick-trial {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: .8rem;
  margin-block-start: clamp(16px, 2.5vw, 26px);
  padding: clamp(18px, 3vw, 28px);
}

.lab-quick-trial h2 {
  margin: 0 0 .3rem;
  color: var(--green);
  font: 650 clamp(1.3rem, 2.5vw, 1.65rem)/1.2 var(--serif);
}

.lab-quick-trial p {
  max-width: 59ch;
  margin: 0;
  color: #395341;
}

.lab-quick-trial > .button {
  min-block-size: 44px;
  max-inline-size: 100%;
  padding: .55rem .85rem;
  font-size: calc(.9rem + var(--site-font-increase, 0px));
  font-weight: 650;
  text-align: center;
}

.lab-quick-trial > .button:focus-visible {
  outline: 3px solid var(--student-action);
  outline-offset: 3px;
}

.training-quick-access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-block-end: clamp(16px, 2.5vw, 26px);
  padding: clamp(.75rem, 2.2vw, 1.1rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f0f4eb;
}

.training-quick-access .button {
  min-block-size: 44px;
  min-inline-size: 0;
  max-inline-size: 100%;
  padding: .55rem 1rem;
  font-size: calc(.95rem + var(--site-font-increase, 0px));
  font-weight: 650;
  text-align: center;
  overflow-wrap: anywhere;
}

.training-quick-access .training-quick-resume {
  flex-direction: column;
  align-items: flex-start;
  gap: .1rem;
  text-align: start;
}

.training-quick-resume > span {
  font: inherit;
}

.training-quick-resume > small {
  font-size: .85em;
  font-weight: 450;
}

@media (max-width: 520px) {
  .training-quick-access > .button {
    flex: 1 1 100%;
    justify-content: flex-start;
    text-align: start;
  }
}

.section-hub-back {
  display: inline-block;
  margin-block-end: 1rem;
}

.section-hub-choices-title {
  margin-block: 0 .85rem;
}

.section-hub-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-hub-choices .button {
  justify-content: center;
  min-inline-size: 5.5rem;
  min-block-size: 52px;
  padding: .65rem 1rem;
  font-size: calc(1rem + var(--site-font-increase));
  font-weight: 700;
  text-align: center;
}

#niveaux-cahiers-vacances .button:focus-visible {
  background: var(--student-sage-hover);
  outline-color: var(--student-action);
}

@media (min-width: 740px) {
  .section-hub--explore .section-hub-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  .section-hub--training .section-hub-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1160px) {
  .section-hub--training .section-hub-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 739px) {
  .section-hub--overview .section-hub-cards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-hub-card.overview-panel { transition: none; }
}
