/* EDUos website
   One family (Archivo) used at two widths: expanded for headings, echoing the wide
   EDU logo, and normal for reading. Structure comes from the timetable: grid lines,
   rows and columns, not decoration. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #00335e;
  --blue: #005395;
  --blue-soft: #e1ebf5;
  --rose: #d63f68;
  --rose-dark: #b3304f;
  --rose-soft: #fbe4ea;
  --sun: #f2c14e;
  --sun-soft: #fcefcb;
  --tint: #eef3f8;
  --line: #d6e0ea;
  --text: #1c3149;
  --muted: #4f647b;
  --paper: #ffffff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: 16px;
  --section: clamp(64px, 9vw, 120px);
  --radius: 10px;
  --header-h: 72px;

  color-scheme: light;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
}

h3 {
  font-size: 1.15rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0 0 1em;
  max-width: 68ch;
}

a {
  color: var(--blue);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

abbr[title] {
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 650;
}

.skip-link:focus {
  top: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted);
}

.note,
.empty {
  color: var(--muted);
}

/* ---------- Buttons & links ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 108%;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.button-primary {
  background: var(--rose);
  color: #fff;
}

.button-primary:hover {
  background: var(--rose-dark);
}

.button-ghost {
  border-color: var(--blue);
  color: var(--blue);
}

.button-ghost:hover {
  background: var(--blue-soft);
}

.button-ghost-inverse {
  border-color: rgb(255 255 255 / 0.7);
  color: #fff;
}

.button-ghost-inverse:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.1);
}

.text-link {
  font-weight: 650;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  flex: none;
  margin-right: auto;
}

.brand img {
  width: 118px;
  height: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2.5px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.has-menu.is-current > .nav-link {
  color: var(--blue);
}

.nav-link[aria-current="page"],
.has-menu.is-current > .nav-link {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.menu-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -3px 0 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.menu-toggle[aria-expanded="true"]::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.dropdown a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
}

.dropdown a:hover,
.dropdown a[aria-current="page"] {
  background: var(--tint);
}

.dropdown strong {
  display: block;
  color: var(--ink);
  font-stretch: 112%;
  font-weight: 750;
}

.dropdown span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  font-size: 0.875rem;
  font-weight: 650;
}

.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 6px;
  text-decoration: none;
}

.lang-switch span {
  background: var(--tint);
  color: var(--ink);
}

.lang-switch a {
  color: var(--muted);
}

.lang-switch a:hover {
  color: var(--blue);
}

/* Mobile navigation: a panel under the header, below 1024px. */
@media (max-width: 1023px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 24px 40px -24px rgb(0 51 94 / 0.35);
  }

  .site-header.is-open .site-nav {
    display: block;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--line);
  }

  .nav-link {
    width: 100%;
    min-height: 52px;
    font-size: 1.1rem;
  }

  .menu-toggle {
    justify-content: space-between;
  }

  .dropdown {
    display: none;
    padding-bottom: 12px;
  }

  .menu-toggle[aria-expanded="true"] + .dropdown {
    display: block;
  }

  .nav-actions {
    justify-content: space-between;
    padding-top: 20px;
  }
}

/* Full bar from 1024px: compact up to 1279px, roomier from 1280px. */
@media (min-width: 1024px) {
  .header-inner {
    gap: 12px;
  }

  .brand img {
    width: 100px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .nav-list {
    display: flex;
    gap: 11px;
  }

  .nav-link {
    font-size: 0.92rem;
  }

  .nav-link,
  .nav-actions .button {
    white-space: nowrap;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .button {
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    font-size: 0.92rem;
  }

  .lang-switch a,
  .lang-switch span {
    min-width: 32px;
  }

  .has-menu {
    position: relative;
  }

  .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    width: 560px;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 30px 60px -30px rgb(0 51 94 / 0.4);
  }

  .dropdown li:first-child {
    grid-column: 1 / -1;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
  }

  /* The script owns the open state; plain hover is only the fallback without it. */
  :root:not(.js) .has-menu:hover .dropdown,
  .menu-toggle[aria-expanded="true"] + .dropdown {
    display: grid;
  }

  /* Bridge the gap below the toggle so the pointer can reach the open panel. */
  .has-menu:has(.menu-toggle[aria-expanded="true"])::after,
  :root:not(.js) .has-menu:hover::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 16px;
  }
}

@media (min-width: 1280px) {
  .header-inner {
    gap: 24px;
  }

  .brand img {
    width: 118px;
  }

  .site-nav {
    gap: 24px;
  }

  .nav-list {
    gap: 22px;
  }

  .nav-link {
    font-size: 1rem;
  }

  .nav-actions {
    gap: 20px;
  }

  .nav-actions .button {
    min-height: 48px;
    padding: 0.7rem 1.35rem;
    font-size: 1rem;
  }
}

@media (min-width: 1360px) {
  .site-nav {
    gap: 32px;
  }

  .nav-list {
    gap: 28px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
}

.section-tint {
  background: var(--tint);
}

.section-intro {
  max-width: 760px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-intro p {
  color: var(--muted);
  font-size: 1.15rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
}

.split {
  display: grid;
  gap: 16px 64px;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}

/* A faint timetable grid behind heroes: columns and rows, nothing more. */
.grid-lines,
.home-hero,
.page-hero {
  background-color: var(--tint);
  background-image: linear-gradient(to right, rgb(0 83 149 / 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(0 83 149 / 0.07) 1px, transparent 1px);
  background-size: 96px 56px;
  background-position: center top;
}

.page-hero {
  padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 18ch;
}

.page-hero .lead {
  max-width: 60ch;
}

/* ---------- Home hero ---------- */

.home-hero {
  padding-top: clamp(40px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}

.home-hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 64px;
  }
}

.home-hero h1 {
  max-width: 15ch;
  font-size: clamp(2.1rem, 1.2rem + 3vw, 3.6rem);
  font-stretch: 112%;
  overflow-wrap: break-word;
}

.proof {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.proof::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--rose);
  vertical-align: 0.05em;
}

/* ---------- Timetable (hero) ---------- */

.timetable {
  position: relative;
  margin: 0;
  padding: clamp(14px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 40px 80px -40px rgb(0 51 94 / 0.45);
}

.timetable-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  color: var(--ink);
}

.timetable-head strong {
  font-stretch: 118%;
  font-weight: 800;
}

.timetable-head span {
  color: var(--muted);
  font-size: 0.875rem;
}

.timetable-grid {
  --row: clamp(2.6rem, 2.2rem + 1.2vw, 3.2rem);
  display: grid;
  grid-template-columns: 2.9rem repeat(5, minmax(0, 1fr));
  grid-template-rows: 2.6rem repeat(var(--periods), var(--row));
  gap: 4px;
}

.tt-day {
  grid-column: calc(var(--d) + 1);
  grid-row: 1;
  align-self: center;
  z-index: 1;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.15;
  text-align: center;
}

.tt-day b,
.tt-day small {
  display: block;
}

.tt-day small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tt-day.is-today b,
.tt-day.is-today small {
  color: var(--rose-dark);
}

.tt-time {
  grid-column: 1;
  grid-row: calc(var(--p) + 1);
  padding-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

/* Empty slots, drawn as a grid underneath the lessons */
.timetable-grid::before {
  content: "";
  grid-column: 2 / -1;
  grid-row: 2 / -1;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: calc((100% + 4px) / 5) calc(var(--row) + 4px);
  background-position: -3px -3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
}

.tt-lesson {
  grid-column: calc(var(--d) + 1);
  grid-row: calc(var(--p) + 1) / span var(--l);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  margin: 0;
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: grab;
  touch-action: none;
  user-select: none;
  animation: tt-place 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(350ms + var(--i) * 85ms);
}

.tt-lesson b {
  overflow: hidden;
  font-size: 0.8rem;
  font-stretch: 72%;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-lesson small {
  overflow: hidden;
  font-size: 0.68rem;
  font-stretch: 80%;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  white-space: nowrap;
}

.tt-blue {
  background: var(--blue);
  color: #fff;
}

.tt-rose {
  background: var(--rose-soft);
  box-shadow: inset 3px 0 var(--rose);
  color: #7d1834;
}

.tt-ink {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 var(--ink);
  color: var(--ink);
}

.tt-sun {
  background: var(--sun-soft);
  box-shadow: inset 3px 0 var(--sun);
  color: #5c4300;
}

.timetable-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
}

.tt-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.timetable-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: tt-status 0.4s ease-out both;
  animation-delay: calc(350ms + 18 * 85ms + 200ms);
}

.status-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.status-ok::before {
  content: "";
  width: 5px;
  height: 9px;
  margin: -2px 2px 0 2px;
  border-right: 2px solid #17845a;
  border-bottom: 2px solid #17845a;
  transform: rotate(45deg);
}

@keyframes tt-place {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tt-status {
  from {
    opacity: 0;
  }
}

@media (max-width: 479px) {
  .tt-lesson small {
    display: none;
  }

  .tt-lesson {
    padding: 3px 5px;
  }

  .tt-lesson b {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-lesson,
  .timetable-status {
    animation: none;
  }

  * {
    transition: none !important;
  }
}

/* ---------- Segments ---------- */

.segments {
  display: grid;
  gap: 16px;
  padding-block: 40px 48px;
  margin-top: clamp(40px, 6vw, 72px);
}

.segments h2 {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-stretch: 100%;
  font-weight: 600;
}

.segments ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}

.segments li {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.segments abbr {
  display: block;
  color: var(--blue);
  font-size: 1.5rem;
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.1;
}

.segments span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Flow (plan, schedule, insight) ---------- */

.flow {
  display: grid;
  gap: 40px 32px;
  counter-reset: step;
}

@media (min-width: 800px) {
  .flow {
    grid-template-columns: repeat(3, 1fr);
  }
}

.flow li {
  position: relative;
  padding-top: 28px;
  border-top: 2px solid var(--line);
  counter-increment: step;
}

.flow li::before {
  content: counter(step);
  position: absolute;
  top: -17px;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
}

.flow-verb {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.flow h3 {
  margin-bottom: 8px;
  font-size: 1.6rem;
  font-stretch: 125%;
  font-weight: 800;
}

.flow h3 a {
  color: inherit;
  text-decoration: none;
}

.flow h3 a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.flow p {
  color: var(--muted);
}

.flow-app {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: none;
}

/* ---------- Screens & showcase ---------- */

.screen {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 60px -36px rgb(0 51 94 / 0.45);
}

.screen-bar {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
}

.screen-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.screen-bar span:nth-child(2) {
  background: var(--blue);
}

.showcase-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
}

.showcase-tabs button {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.showcase-tabs button:hover {
  border-color: var(--blue);
}

.showcase-tabs button[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.caption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Feature rows ---------- */

.feature-rows {
  display: grid;
  gap: clamp(64px, 9vw, 112px);
}

.feature-row {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .feature-row {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 56px;
  }

  .feature-row:nth-child(even) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }

  .feature-row:nth-child(even) .feature-row-text {
    order: 2;
  }
}

.feature-row-text h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.feature-row-text p {
  color: var(--muted);
}

/* ---------- Icon grid ---------- */

.icon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

@media (min-width: 640px) {
  .icon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .icon-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .icon-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.icon-grid li {
  padding: clamp(24px, 3vw, 36px);
  background: #fff;
}

.icon-grid img {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
}

.icon-grid p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Why switch ---------- */

.why {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.why th {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
}

.why td {
  width: 50%;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.why td:first-child {
  color: var(--muted);
}

.why td:last-child {
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}

.why tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 639px) {
  .why thead {
    position: absolute;
    clip-path: inset(50%);
  }

  .why,
  .why tbody,
  .why tr,
  .why td {
    display: block;
    width: auto;
  }

  .why tr {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
  }

  .why tr:last-child {
    border-bottom: 0;
  }

  .why td,
  .why td:last-child {
    padding: 0;
    border: 0;
  }

  .why td:last-child {
    margin-top: 8px;
    padding-left: 14px;
    box-shadow: inset 3px 0 var(--rose);
  }
}

/* ---------- Product overview ---------- */

.pillars {
  display: grid;
  gap: 40px;
}

@media (min-width: 800px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillars h3 {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  font-stretch: 125%;
  font-weight: 800;
}

.pillars p {
  color: var(--muted);
}

.modules {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .modules {
    grid-template-columns: 1fr 1fr;
  }
}

.link-list {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.link-list a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.link-list strong {
  color: var(--ink);
  font-stretch: 115%;
  font-weight: 750;
}

.link-list a:hover strong {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.checklist li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-bottom: 1px solid var(--line);
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 1.05em;
  left: 4px;
  width: 7px;
  height: 13px;
  border-right: 2.5px solid var(--rose);
  border-bottom: 2.5px solid var(--rose);
  transform: rotate(45deg);
}

@media (min-width: 720px) {
  .checklist-columns {
    columns: 2;
    column-gap: 40px;
  }

  .checklist-columns li {
    break-inside: avoid;
  }
}

/* ---------- Details, courses, prose ---------- */

.details {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.details > div {
  display: grid;
  gap: 2px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 560px) {
  .details > div {
    grid-template-columns: 11rem 1fr;
  }
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.courses {
  margin: 0 0 28px;
  border-top: 1px solid var(--line);
}

.courses > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.courses dt {
  color: var(--ink);
  font-stretch: 112%;
  font-weight: 750;
}

.courses dd {
  margin: 0;
  color: var(--muted);
}

.prose p {
  max-width: 68ch;
}

/* ---------- CTA band ---------- */

.cta-band {
  padding-block: var(--section);
  background-color: var(--blue);
  background-image: linear-gradient(to right, rgb(255 255 255 / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.06) 1px, transparent 1px);
  background-size: 96px 56px;
  color: #fff;
}

.cta-band h2 {
  max-width: 20ch;
  color: #fff;
}

.cta-band p {
  color: rgb(255 255 255 / 0.85);
  font-size: 1.15rem;
}

.cta-band .cta-phone {
  margin-top: 20px;
  font-size: 1rem;
}

.cta-band .cta-phone a {
  color: #fff;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* ---------- News ---------- */

.news-list {
  border-top: 1px solid var(--line);
}

.news-list li {
  display: grid;
  gap: 4px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .news-list li {
    grid-template-columns: 11rem 1fr;
    align-items: baseline;
  }
}

.news-list time,
.article time {
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.news-list h3 {
  margin: 0;
  font-size: 1.25rem;
}

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

.news-list h3 a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.article {
  padding-block: clamp(40px, 6vw, 80px) var(--section);
  border-bottom: 1px solid var(--line);
}

.article .wrap {
  max-width: calc(760px + 2 * var(--gutter));
}

.article h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
}

.back-link {
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */

.contact-layout {
  display: grid;
  gap: 56px;
}

@media (min-width: 960px) {
  .contact-layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 80px;
    align-items: start;
  }
}

.contact-aside {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tint);
}

.contact-aside h2 {
  font-size: 1.5rem;
}

.contact-aside .details > div {
  grid-template-columns: 1fr;
}

.form {
  display: grid;
  gap: 22px;
}

.form h2,
.form-success h2 {
  font-size: 1.6rem;
}

.field {
  display: grid;
  gap: 6px;
}

.field-row {
  display: grid;
  gap: 22px;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label,
.choices legend {
  color: var(--ink);
  font-weight: 650;
}

.hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #b9c7d6;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.form textarea {
  resize: vertical;
}

.form input:focus-visible,
.form textarea:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgb(0 83 149 / 0.25);
  outline-offset: 0;
}

.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"] {
  border-color: var(--rose);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choices legend {
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--ink);
}

.choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.form .button {
  justify-self: start;
}

.form-errors {
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--rose-soft);
  box-shadow: inset 4px 0 var(--rose);
  color: #6c1530;
}

.form-errors p {
  margin: 0 0 6px;
  font-weight: 700;
}

.form-errors ul {
  padding-left: 1.2em;
  list-style: disc;
}

.form-errors a {
  color: inherit;
}

.form-success {
  padding: 28px;
  border-radius: 14px;
  background: var(--tint);
  box-shadow: inset 4px 0 #17845a;
}

.form-success p {
  margin: 0;
  font-size: 1.15rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-top: clamp(56px, 8vw, 96px);
  background: var(--ink);
  color: rgb(255 255 255 / 0.78);
  font-size: 0.97rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

.footer-brand img {
  width: 141px;
  margin-bottom: 20px;
}

.footer-brand p {
  max-width: 36ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
}

.footer-nav h2 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 1rem;
  font-stretch: 112%;
  font-weight: 750;
}

.footer-nav li {
  margin-bottom: 8px;
  overflow-wrap: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 56px;
  padding-block: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Segment strip links (home) ---------- */

.segments li {
  padding: 0;
}

.segments a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  text-decoration: none;
}

.segments a:hover {
  background: var(--tint);
}

.segments a:hover abbr {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- Education type pages ---------- */

.segment-hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .segment-hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
  }
}

.day {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 40px 80px -40px rgb(0 51 94 / 0.45);
}

.day-label {
  margin-bottom: 14px;
  color: var(--ink);
  font-stretch: 118%;
  font-weight: 800;
}

.day > ol {
  display: grid;
  gap: 6px;
}

.day > ol > li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 10px;
  align-items: stretch;
  animation: tt-place 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(250ms + var(--i) * 110ms);
}

.day > ol > li > time {
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.day-block {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.3;
}

.day-block b {
  font-stretch: 85%;
}

.day-block small {
  font-size: 0.8rem;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .day > ol > li {
    animation: none;
  }
}

/* ---------- Integrations catalogue ---------- */

.catalogue {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

@media (min-width: 720px) {
  .catalogue {
    grid-template-columns: repeat(2, 1fr);
  }
}

.catalogue-group {
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
}

.catalogue-head h3 {
  margin-bottom: 4px;
}

.catalogue-head p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.catalogue-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.catalogue-name {
  color: var(--ink);
  font-weight: 650;
}

.badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}

.badge-available {
  background: #e3f4ec;
  color: #11653f;
}

.badge-soon {
  background: var(--tint);
  color: var(--muted);
}

.catalogue-missing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 32px;
  padding: 24px 28px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.catalogue-missing h3 {
  margin-bottom: 4px;
}

.catalogue-missing p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Partners ---------- */

.partner-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.partner-list li {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.partner-type {
  display: block;
  margin-bottom: 8px;
  color: var(--rose-dark);
  font-size: 0.9rem;
  font-weight: 650;
}

.partner-list h3 {
  font-size: 1.5rem;
  font-stretch: 125%;
  font-weight: 800;
}

.partner-list p {
  color: var(--muted);
}

/* ---------- Timetable interaction ---------- */

.tt-lesson:hover {
  filter: brightness(0.97);
}

.tt-lesson:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
}

.tt-lesson[aria-expanded="true"] {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.tt-lesson.is-dragging {
  z-index: 5;
  cursor: grabbing;
  box-shadow: 0 18px 30px -12px rgb(0 51 94 / 0.55);
  opacity: 0.92;
}

.tt-lesson.is-returning {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tt-lesson.is-settled {
  animation: tt-settle 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timetable.is-dragging {
  cursor: grabbing;
}

.tt-target {
  grid-column: calc(var(--d) + 1);
  grid-row: calc(var(--p) + 1) / span var(--l);
  z-index: 2;
  border: 2px dashed var(--blue);
  border-radius: 6px;
  background: rgb(0 83 149 / 0.08);
  pointer-events: none;
}

.tt-target.is-conflict {
  border-color: var(--rose);
  background: rgb(214 63 104 / 0.12);
}

.tt-today {
  grid-column: calc(var(--d) + 1);
  grid-row: 1 / -1;
  margin: -4px -2px;
  border-radius: 8px;
  background: rgb(214 63 104 / 0.06);
  pointer-events: none;
}

.tt-now {
  position: relative;
  grid-column: calc(var(--d) + 1);
  grid-row: calc(var(--p) + 1);
  align-self: start;
  z-index: 4;
  height: 2px;
  margin-top: calc(var(--f, 0) * var(--row) - 1px);
  background: var(--rose);
  pointer-events: none;
}

.tt-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.tt-message {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.tt-message[data-tone="conflict"] {
  color: var(--rose-dark);
}

.tt-popover {
  position: absolute;
  z-index: 10;
  width: min(300px, calc(100% - 16px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 48px -20px rgb(0 51 94 / 0.5);
  font-size: 0.9rem;
}

.tt-popover[hidden] {
  display: none;
}

.pop-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.pop-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.pop-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -6px -8px 0 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.pop-close:hover {
  background: var(--tint);
  color: var(--ink);
}

.pop-time {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.tt-popover ul li {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.pop-label {
  color: var(--muted);
}

.pop-value {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pop-overall {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 650;
  color: var(--ink);
}

.tt-popover .badge {
  padding: 2px 8px;
  font-size: 0.72rem;
}

@keyframes tt-settle {
  0% {
    transform: scale(1.06);
  }
  100% {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-lesson.is-settled,
  .tt-lesson.is-returning {
    animation: none;
    transition: none;
  }
}

/* ---------- Electives (program enrolments) ---------- */

.electives {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.75);
  color: var(--text);
}

.electives-label {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.electives ul {
  display: grid;
  gap: 8px;
}

.electives li {
  display: grid;
  gap: 3px;
}

.electives-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.electives-row b {
  color: var(--ink);
  font-stretch: 100%;
  font-weight: 650;
}

.electives-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.electives-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill);
  border-radius: 999px;
  background: var(--blue);
}

/* Marker for the minimum number of enrolments */
.electives-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--min);
  width: 2px;
  background: var(--ink);
  opacity: 0.45;
}

.electives small {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.electives .badge {
  padding: 1px 8px;
  font-size: 0.7rem;
}

.badge-full {
  background: var(--rose-soft);
  color: #7d1834;
}

.badge-needed {
  background: var(--sun-soft);
  color: #5c4300;
}

.electives-deadline {
  margin: 8px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---------- Dropdown: a lone last item spans both columns ---------- */

@media (min-width: 1024px) {
  .dropdown li:last-child:nth-child(even) {
    grid-column: 1 / -1;
  }
}

/* ---------- Roles ---------- */

.badge-web {
  background: var(--blue);
  color: #fff;
}

.badge-app {
  background: var(--rose-soft);
  color: #7d1834;
}

.section-more {
  margin: 28px 0 0;
}

.role-cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 800px) {
  .role-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.role-cards li {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.role-cards h3 {
  margin: 14px 0 6px;
  font-size: 1.4rem;
  font-stretch: 125%;
  font-weight: 800;
}

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

.role-cards h3 a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.role-cards p {
  margin: 0;
  color: var(--muted);
}

.role-groups {
  display: grid;
  gap: clamp(56px, 8vw, 96px);
}

.role-group {
  display: grid;
  gap: 24px 64px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

@media (min-width: 900px) {
  .role-group {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }
}

.role-where {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.role-intro .screen {
  margin-top: 24px;
}

/* ---------- Security ---------- */

.steps {
  display: grid;
  gap: 10px;
  margin: 12px 0 28px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 14px 16px 14px 56px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.85rem;
}

.tenants {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .tenants {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 64px;
  }
}

.tenants h3 {
  margin-top: 28px;
}

.tenant-diagram {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.tenant-account {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-stretch: 112%;
  font-weight: 750;
}

.tenant-lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 32px;
  margin: 0 16.6%;
  border: 2px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.tenant-lines span:nth-child(2) {
  border-left: 2px solid var(--line);
  margin-left: -1px;
}

.tenant-schools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tenant-school {
  display: grid;
  gap: 10px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tint);
}

.tenant-school strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.tenant-db {
  position: relative;
  display: block;
  padding: 18px 6px 8px;
  border: 2px solid var(--blue);
  border-radius: 50% / 12px;
  background: #fff;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 650;
}

.two-lists {
  display: grid;
  gap: 48px;
}

@media (min-width: 900px) {
  .two-lists {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

/* ---------- Integration flow diagram ---------- */

.flow-diagram {
  display: grid;
  gap: 12px;
  align-items: center;
  margin: 0 0 40px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

@media (min-width: 900px) {
  .flow-diagram {
    grid-template-columns: 1fr 120px 1.1fr 140px 1.2fr;
  }
}

.fd-node {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 20px 16px;
  border-radius: 12px;
  text-align: center;
}

.fd-school {
  border: 2px solid var(--blue);
  color: var(--blue);
}

.fd-center {
  background: var(--blue);
  color: #fff;
}

.fd-center strong {
  font-stretch: 118%;
  font-weight: 800;
}

.fd-partners {
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink);
}

.fd-partners ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.fd-partners li {
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
}

.fd-link {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.fd-arrow {
  position: relative;
  display: block;
  width: 100%;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  text-align: center;
}

.fd-arrow::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: var(--blue);
}

.fd-arrow::before {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
}

.fd-right::before,
.fd-both::before {
  right: 8px;
  transform: rotate(45deg);
}

.fd-left::before {
  left: 8px;
  transform: rotate(-135deg);
}

.fd-both {
  height: 10px;
}

.fd-blocked {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 8px 0 0;
  padding: 6px 14px;
  border: 2px dashed var(--rose);
  border-radius: 999px;
  color: var(--rose-dark);
  font-size: 0.85rem;
  font-weight: 650;
}

.fd-blocked::before {
  content: "×";
  margin-right: 8px;
  font-weight: 800;
}

@media (max-width: 899px) {
  .fd-link {
    padding: 4px 0;
  }

  .fd-arrow {
    width: 60%;
  }
}

.rules {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

@media (min-width: 720px) {
  .rules {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .rules {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rules li {
  padding: 24px;
  background: #fff;
}

.rules h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.rules p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Screenshot lightbox ---------- */

.screen img {
  cursor: zoom-in;
}

.lightbox {
  max-width: min(96vw, 1900px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  overflow: auto;
}

.lightbox::backdrop {
  background: rgb(0 51 94 / 0.75);
}

.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-out;
}

.lightbox-close {
  position: sticky;
  top: 8px;
  float: right;
  z-index: 1;
  width: 40px;
  height: 40px;
  margin: 8px 8px -48px 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.role-lists {
  display: grid;
  gap: 32px;
}

.role-lists h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  font-stretch: 112%;
}

.role-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--ink);
  font-size: 0.92rem;
}

/* ---------- Timeline (lifecycle, implementation) ---------- */

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  counter-reset: stage;
}

/* The vertical line connecting the numbered stages */
.timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 19px;
  width: 2px;
  background: var(--line);
}

.timeline > li {
  position: relative;
  padding: 22px 24px 22px 72px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  counter-increment: stage;
}

.timeline > li::before {
  content: counter(stage);
  position: absolute;
  top: 20px;
  left: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 4px solid var(--tint);
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 750;
  transform: translateX(-1px);
}

.section:not(.section-tint) .timeline > li::before {
  border-color: #fff;
}

.timeline > li {
  margin-left: 0;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.timeline-when {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline h3 {
  margin-bottom: 4px;
  font-size: 1.35rem;
  font-stretch: 125%;
  font-weight: 800;
}

.timeline p {
  margin-bottom: 8px;
  color: var(--muted);
}

.timeline .checklist li {
  padding: 8px 0 8px 30px;
  font-size: 0.97rem;
}

@media (min-width: 900px) {
  .timeline > li {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 0 40px;
    align-items: start;
  }

  .timeline-head,
  .timeline h3,
  .timeline p {
    grid-column: 1;
  }

  .timeline .checklist {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}

/* ---------- Callout ---------- */

.callout {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 16px;
  background: var(--ink);
  color: rgb(255 255 255 / 0.85);
}

.callout h2 {
  color: #fff;
}

.callout p {
  margin: 0;
  font-size: 1.15rem;
}

@media (min-width: 960px) {
  .callout-with-screen {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }
}

/* ---------- Import chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.chips li {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

/* ---------- App notifications ---------- */

.notify-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 800px) {
  .notify-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.notify-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.notify-phone {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 28px;
}

.notify-push .notify-phone {
  background: linear-gradient(160deg, #0b3f6e, #00335e 60%, #19223a);
}

.notify-in-app .notify-phone {
  background: var(--tint);
}

.notify-message {
  width: min(100%, 340px);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.notify-push .notify-message {
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.5);
  color: var(--text);
}

.notify-in-app .notify-message {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: inset 3px 0 var(--blue);
  color: var(--text);
}

.notify-app {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.notify-app img {
  border-radius: 4px;
}

.notify-app span {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
}

.notify-message p {
  margin: 0;
}

.notify-card figcaption {
  padding: 20px 24px 24px;
}

.notify-card figcaption h3 {
  margin-bottom: 4px;
}

.notify-card figcaption p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Blog ---------- */

.blog-list {
  display: grid;
  gap: 16px;
}

@media (min-width: 800px) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .blog-list-compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.blog-card h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

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

.blog-card h2 a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.blog-card > p:last-child {
  margin: 0;
  color: var(--muted);
}

.blog-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.blog-labels li {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-updated {
  margin-top: -6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.blog-body {
  margin-top: 32px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.blog-body h2 {
  margin-top: 1.6em;
  font-size: 1.6rem;
}

.blog-body h3 {
  margin-top: 1.4em;
}

.blog-body ul,
.blog-body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.blog-body ul {
  list-style: disc;
}

.blog-body ol {
  list-style: decimal;
}

.blog-body li {
  margin-bottom: 0.3em;
}

.blog-body img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.blog-body blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--rose);
  color: var(--ink);
  font-size: 1.15rem;
}

.blog-body pre {
  margin: 1.2em 0;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--ink);
  color: #e8f0f8;
  font-size: 0.92rem;
  line-height: 1.5;
}

.blog-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.blog-body :not(pre) > code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--tint);
  color: var(--ink);
}

.blog-body table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.blog-body th,
.blog-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.blog-body th {
  background: var(--tint);
  color: var(--ink);
}

.blog-body .confluence-information-macro {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--tint);
  box-shadow: inset 4px 0 var(--blue);
}

.blog-body .confluence-information-macro-warning {
  background: var(--rose-soft);
  box-shadow: inset 4px 0 var(--rose);
}

.blog-body .confluence-information-macro-note {
  background: var(--sun-soft);
  box-shadow: inset 4px 0 var(--sun);
}

.blog-body .confluence-information-macro p:last-child {
  margin-bottom: 0;
}

/* ---------- Route lesson: one lesson that moves through several rooms ---------- */

.tt-route {
  justify-content: flex-start;
  padding: 5px 7px 4px;
}

.tt-route-head {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.tt-route-head b {
  min-width: 0;
}

.tt-route-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
}

/* The stops, each as tall as its share of the lesson, joined by a route line */
.tt-segments {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  margin-top: 3px;
}

.tt-segments::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 1.5px;
  background: currentColor;
  opacity: 0.45;
}

.tt-seg {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 5px;
  min-height: 0;
  padding-left: 12px;
  border-top: 1px dashed rgb(255 255 255 / 0.35);
  font-size: 0.66rem;
  font-stretch: 80%;
  white-space: nowrap;
}

.tt-seg:first-child {
  border-top: 0;
}

.tt-seg::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: currentColor;
}

.tt-seg:last-child::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.tt-seg-room {
  font-weight: 700;
}

@media (max-width: 479px) {
  .tt-route-chip {
    display: none;
  }
}

/* Route in the lesson popover */
.pop-route {
  margin: 4px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.pop-route-title {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.pop-route ol {
  position: relative;
  display: grid;
  gap: 6px;
}

.pop-route li {
  display: grid;
  grid-template-columns: 22px 1fr 18px;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.pop-route-step {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.pop-route-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.pop-route-room {
  display: grid;
  line-height: 1.2;
}

.pop-route-room strong {
  color: var(--ink);
}

.pop-route-room small {
  color: var(--muted);
  font-size: 0.75rem;
}

.pop-check {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e3f4ec;
}

.pop-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #17845a;
  border-bottom: 2px solid #17845a;
  transform: rotate(45deg);
}

/* ---------- EDU App phone (app page hero) ---------- */

.app-hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .app-hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 64px;
  }
}

.phone {
  --k: 1.25px; /* height per minute in the timeline */
  --app-blue: #005395;
  --app-ink: #3a4250;
  --app-grey: #8a93a0;
  --app-card: #edf1f4;
  justify-self: center;
  margin: 0;
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: calc(100vw - 2 * var(--gutter));
  height: 640px;
  overflow: hidden;
  border: 10px solid #0f2238;
  border-radius: 42px;
  background: #fff;
  box-shadow: 0 50px 90px -40px rgb(0 51 94 / 0.55);
  color: var(--app-ink);
  font-size: 13px;
  line-height: 1.3;
}

.phone-head {
  padding: 26px 14px 10px;
  border-bottom: 1px solid #e7eaee;
  background: #f6f7f9;
}

.phone-title {
  margin: 0 0 12px 6px;
  font-size: 1.55rem;
  font-weight: 800;
}

.phone-week {
  margin-left: 4px;
  color: var(--app-grey);
  font-size: 0.85rem;
  font-weight: 500;
}

.phone-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.phone-day {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 6px 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--app-ink);
  font: inherit;
  cursor: pointer;
}

.phone-day span {
  color: var(--app-grey);
  font-size: 0.75rem;
}

.phone-day b {
  font-size: 0.95rem;
}

.phone-day.is-today b {
  color: var(--rose-dark);
}

.phone-day[aria-selected="true"] {
  background: var(--app-blue);
  color: #fff;
}

.phone-day[aria-selected="true"] span,
.phone-day[aria-selected="true"] b {
  color: #fff;
}

.phone-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px 20px 8px;
  scrollbar-width: thin;
}

.phone-timeline {
  --first: 480;
  position: relative;
  height: calc((16.5 * 60 - var(--first)) * var(--k));
}

.phone-hour {
  position: absolute;
  top: calc((var(--at) - var(--first)) * var(--k));
  left: 0;
  right: 0;
  color: var(--app-grey);
  font-size: 0.7rem;
  transform: translateY(-50%);
  font-variant-numeric: tabular-nums;
}

.phone-hour::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 42px;
  right: 0;
  height: 1px;
  background: #e8ebef;
}

.phone-dayview {
  position: absolute;
  inset: 0;
}

.phone-dayview[hidden] {
  display: none;
}

.phone-empty {
  margin: 40px 0 0 50px;
  color: var(--app-grey);
}

.phone-lesson {
  position: absolute;
  top: calc((var(--start) - var(--first)) * var(--k) + 1px);
  left: calc(46px + (100% - 46px) * var(--col) / var(--cols));
  width: calc((100% - 46px) / var(--cols) - 4px);
  height: calc((var(--end) - var(--start)) * var(--k) - 3px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: var(--app-card);
  box-shadow: inset 3px 0 #d5dde5;
  color: var(--app-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.2s;
}

.phone-lesson:hover {
  filter: brightness(0.97);
}

.phone-lesson:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
}

.pl-top,
.pl-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pl-code {
  color: var(--app-blue);
  font-size: 0.95rem;
  font-weight: 600;
}

.pl-time {
  margin-left: auto;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pl-time s {
  color: var(--app-grey);
}

.pl-room,
.pl-teacher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #5d6673;
  font-size: 0.8rem;
  white-space: nowrap;
}

.pl-room svg,
.pl-teacher svg {
  color: var(--app-grey);
}

.pl-tag {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.pl-homework {
  border: 1px solid var(--rose);
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.pl-test {
  background: var(--rose);
  color: #fff;
}

.pl-withdrawn {
  margin-left: auto;
  color: #d92d2d;
  font-size: 0.72rem;
}

.phone-lesson.is-short {
  justify-content: center;
  padding-top: 3px;
  padding-bottom: 3px;
}

.phone-lesson.is-past {
  opacity: 0.5;
}

.phone-lesson.is-current {
  box-shadow: inset 3px 0 var(--rose);
}

.phone-lesson.is-changed {
  box-shadow: inset 3px 0 var(--app-blue);
}

.phone-lesson.is-withdrawn {
  background: #f6f7f9;
  box-shadow: inset 3px 0 #e3e7ec;
}

.phone-lesson.is-withdrawn .pl-code,
.phone-lesson.is-withdrawn .pl-room {
  opacity: 0.55;
}

.phone-lesson.is-withdrawn .pl-time {
  display: none;
}

.phone-now {
  position: absolute;
  top: calc((var(--at) - var(--first)) * var(--k));
  left: 42px;
  right: 0;
  z-index: 3;
  height: 2px;
  background: var(--rose);
  pointer-events: none;
}

.phone-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.phone-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 58px;
  z-index: 5;
  padding: 16px 18px 18px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -16px 40px -12px rgb(0 0 0 / 0.3);
  animation: sheet-up 0.22s ease-out;
}

.phone-sheet[hidden] {
  display: none;
}

.phone-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.phone-sheet h3 {
  margin: 0;
  font-size: 1.15rem;
}

.phone-sheet-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #eef1f4;
  color: var(--app-ink);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.phone-sheet dl {
  margin: 0;
}

.phone-sheet dl div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eef1f4;
}

.phone-sheet dt {
  color: var(--app-grey);
}

.phone-sheet dd {
  margin: 0;
  font-weight: 600;
}

.phone-sheet-tag {
  display: inline-block;
  margin: 12px 0 0;
  padding: 1px 8px;
  border-radius: 5px;
  background: var(--rose);
  color: #fff;
  font-size: 0.75rem;
}

.phone-sheet-detail {
  margin: 8px 0 0;
}

.phone-sheet [hidden] {
  display: none;
}

.phone-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 58px;
  border-top: 1px solid #e7eaee;
  background: #f6f7f9;
}

.phone-tabs span {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  color: var(--app-grey);
}

.phone-tabs small {
  font-size: 0.62rem;
}

.phone-tabs .is-active {
  color: var(--app-blue);
}

.phone-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-sheet {
    animation: none;
  }
}

/* A short moved lesson shows old and new time; the room is in the details. */
.phone-lesson.is-short.is-changed .pl-room {
  display: none;
}

/* Side-by-side lessons: the time may wrap below the subject. */
.phone-lesson.is-half .pl-top {
  flex-wrap: wrap;
  gap: 0 6px;
}

.phone-lesson.is-half .pl-time {
  margin-left: 0;
}

.phone-lesson.is-half .pl-withdrawn {
  margin-left: auto;
}

/* Route lesson in the app timeline: one lesson, rooms in order */
.pl-route-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dbe6f0;
  color: var(--app-blue);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
}

.pl-route {
  position: relative;
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding-left: 14px;
}

.pl-route::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 3px;
  width: 1.5px;
  background: #b9c8d6;
}

.pl-stop {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.8rem;
}

.pl-stop::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-blue);
}

.pl-stop:last-child::before {
  background: var(--app-card);
  box-shadow: inset 0 0 0 1.5px var(--app-blue);
}

.pl-stop b {
  font-weight: 600;
}

.pl-stop small {
  color: var(--app-grey);
  font-size: 0.72rem;
}

.phone-sheet-route {
  margin-top: 10px;
}

.phone-sheet-route p {
  margin: 0 0 6px;
  color: var(--app-grey);
}

.phone-sheet-route ol {
  display: grid;
  gap: 6px;
  counter-reset: stop;
}

.phone-sheet-route li {
  display: flex;
  align-items: center;
  gap: 8px;
  counter-increment: stop;
}

.phone-sheet-route li::before {
  content: counter(stop);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--app-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.phone-sheet-route li span {
  color: var(--app-grey);
}

.phone-sheet-route small {
  display: block;
  margin-top: 8px;
  color: var(--app-grey);
}

/* ---------- Search ---------- */

.search-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}

.search-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.search-toggle-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .search-toggle-desktop {
    display: inline-grid;
  }

  .search-toggle-mobile {
    display: none;
  }
}

.search-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: min(640px, calc(100dvh - 48px));
  margin: max(48px, 8vh) auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 40px 80px -30px rgb(0 51 94 / 0.55);
  color: var(--text);
}

.search-dialog[open] {
  display: flex;
  flex-direction: column;
}

.search-dialog::backdrop {
  background: rgb(0 51 94 / 0.45);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 0;
  outline: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
}

.search-bar input::-webkit-search-cancel-button {
  display: none;
}

.search-dialog kbd,
.search-bar kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
}

.search-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.search-suggest {
  padding: 10px 10px 14px;
}

.search-suggest[hidden] {
  display: none;
}

.search-suggest p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-suggest div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-suggest button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-suggest button:hover {
  border-color: var(--blue);
}

.search-group {
  padding: 12px 10px 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.search-list [role="option"] a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.search-list [role="option"][aria-selected="true"] a {
  background: var(--tint);
  box-shadow: inset 3px 0 var(--blue);
}

.search-list strong {
  color: var(--ink);
  font-weight: 700;
}

.search-list span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-list mark,
.search-results mark {
  padding: 0 1px;
  border-radius: 3px;
  background: var(--sun-soft);
  color: inherit;
}

.search-empty {
  margin: 16px 12px;
  color: var(--muted);
}

.search-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: var(--tint);
  color: var(--muted);
  font-size: 0.8rem;
}

.search-foot a {
  font-weight: 650;
}

@media (max-width: 599px) {
  .search-foot span {
    display: none;
  }
}

/* Search page */
.search-form {
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin-top: 8px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  border: 1.5px solid #b9c7d6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
}

.search-form input:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgb(0 83 149 / 0.25);
  outline-offset: 0;
}

.search-suggestions {
  margin-top: 18px;
  color: var(--muted);
}

.search-suggestions a {
  margin-left: 10px;
  font-weight: 600;
}

.search-count {
  color: var(--muted);
}

.search-results {
  display: grid;
  gap: 4px;
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.search-results li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.search-type {
  display: block;
  margin-bottom: 2px;
  color: var(--rose-dark);
  font-size: 0.8rem;
  font-weight: 650;
}

.search-results a {
  font-size: 1.2rem;
  text-decoration: none;
}

.search-results a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.search-results p {
  margin: 4px 0 0;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

@media (min-width: 1100px) {
  .rules-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Legal pages, footer company line, form privacy ---------- */

.legal {
  max-width: calc(780px + 2 * var(--gutter));
}

.legal h2 {
  margin-top: 1.6em;
  font-size: 1.5rem;
}

.legal-company {
  color: var(--muted);
}

.footer-company {
  font-size: 0.85rem;
  opacity: 0.85;
}

.form-privacy {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.nav-login {
  font-weight: 650;
}

/* ---------- Electives in the mock-ups ----------
   A lesson the student chooses: dashed until the choice is made, part of a series of
   lessons, with the enrolments so far. On the home timetable and in the app phone. */

.tt-elective {
  padding: 3px 6px;
  border: 1.5px dashed var(--blue);
  background: var(--paper);
  color: var(--ink);
}

.tt-elective small {
  color: var(--blue);
  font-weight: 600;
  opacity: 1;
}

.pop-elective {
  display: grid;
  gap: 4px;
  margin: 4px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.pop-elective-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pop-elective-series {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
}

.pop-elective-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.pop-elective .pop-route-note {
  margin-top: 4px;
}

/* The day with an open choice carries a dot until the student has chosen. */
.phone-day.has-choice {
  position: relative;
}

.phone-day.has-choice::after {
  content: "";
  position: absolute;
  top: 3px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 2px #f6f7f9;
}

.phone-day.has-choice[aria-selected="true"]::after {
  box-shadow: 0 0 0 2px var(--app-blue);
}

.phone-lesson.is-elective {
  border: 1.5px dashed var(--app-blue);
  background: #fff;
  box-shadow: none;
}

.pl-elective-chip {
  padding: 0 6px;
  border: 1px solid var(--app-blue);
  border-radius: 999px;
  color: var(--app-blue);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.pl-series {
  color: #5d6673;
  font-size: 0.8rem;
  white-space: nowrap;
}

.pl-choice {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pl-choice.is-open {
  background: var(--sun-soft);
  color: #5c4300;
}

.pl-choice.is-enrolled {
  background: #e3f4ec;
  color: #11653f;
}

.pl-choice.is-declined {
  background: #eef1f4;
  color: var(--app-grey);
}

/* Enrolled: a lesson like any other. Declined: faded, it leaves the timetable. */
.phone-lesson.is-elective.is-enrolled {
  border-color: transparent;
  background: var(--app-card);
  box-shadow: inset 3px 0 var(--app-blue);
}

.phone-lesson.is-elective.is-declined {
  border-color: #c9d1da;
  background: #f6f7f9;
}

.phone-lesson.is-elective.is-declined .pl-code,
.phone-lesson.is-elective.is-declined .pl-elective-chip,
.phone-lesson.is-elective.is-declined .pl-series {
  opacity: 0.55;
}

.phone-lesson.is-elective.is-declined .pl-time {
  color: var(--app-grey);
  text-decoration: line-through;
}

.phone-sheet {
  max-height: calc(100% - 70px);
  overflow-y: auto;
}

.phone-sheet-elective {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pe-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 600;
}

.pe-series {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pe-series li {
  display: grid;
  justify-items: center;
  padding: 4px 0;
  border: 1px dashed #b9c4cf;
  border-radius: 7px;
  line-height: 1.15;
}

.pe-series b {
  font-size: 0.85rem;
}

.pe-series small {
  color: var(--app-grey);
  font-size: 0.62rem;
}

.pe-series li.is-now {
  border: 1.5px solid var(--app-blue);
}

.phone[data-elective-state="enrolled"] .pe-series li {
  border: 1px solid var(--app-blue);
  background: var(--app-blue);
  color: #fff;
}

.phone[data-elective-state="enrolled"] .pe-series small {
  color: rgb(255 255 255 / 0.8);
}

.phone[data-elective-state="declined"] .pe-series li {
  opacity: 0.45;
}

.pe-range {
  margin: 0;
  color: #5d6673;
  font-size: 0.8rem;
}

.pe-seats {
  display: grid;
  gap: 3px;
}

.pe-seats small {
  color: var(--app-grey);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.pe-choice p,
.pe-result p {
  margin: 0;
}

.pe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.pe-actions button {
  min-height: 38px;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.pe-enrol {
  border: 0;
  background: var(--app-blue);
  color: #fff;
}

.pe-decline {
  border: 1px solid #cfd6de;
  background: #fff;
  color: var(--app-ink);
}

.pe-result {
  padding: 10px 12px;
  border-radius: 10px;
}

.pe-result.is-enrolled {
  background: #e3f4ec;
  color: #11653f;
}

.pe-result.is-declined {
  background: #f1f3f6;
}

.pe-undo {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--app-blue);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.pe-actions button:focus-visible,
.pe-undo:focus-visible,
.pe-result:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}
