/* Shared layout for the static inner pages. These pages are light; only the
 * homepage is dark.
 *
 * Document pages: breadcrumb and centred title on the white page, then the
 * content card with a list of related pages beside it.
 * Story pages (.story-page): large centred title, section tabs, a framed
 * photo and card sections.
 *
 * Selectors start with `html body` so load order against the older page
 * stylesheets does not matter. */

:root {
  --inner-page: #ffffff;
  --inner-band: #f6f7f9;
  --inner-card: #ffffff;
  --inner-inset: #f4f6f9;
  --inner-field: #ffffff;
  --inner-line: rgba(16, 39, 75, 0.12);
  --inner-line-strong: rgba(16, 39, 75, 0.3);
  --inner-heading: #10274b;
  --inner-text: #2f3a4c;
  --inner-muted: #5f6b7c;
  --inner-card-shadow: 0 1px 2px rgba(16, 39, 75, 0.04), 0 14px 36px rgba(16, 39, 75, 0.08);
  --inner-doc-width: 1120px;
  --inner-wide-width: 1120px;
  /* Space above a page title; it clears the breadcrumb row. */
  --inner-title-top: clamp(104px, 8.4vw, 132px);
  --inner-title-bottom: clamp(40px, 4.2vw, 60px);
}

/* Breadcrumb */

html body .page-crumbs {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: var(--brand-chrome-inline, 20px);
  color: var(--inner-muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

html body .page-crumbs a {
  color: var(--inner-muted);
  text-decoration: none;
}

html body .page-crumbs a:hover {
  color: var(--inner-heading);
  text-decoration: underline;
  text-underline-offset: 3px;
}

html body .page-crumbs [aria-current="page"] {
  color: var(--inner-heading);
}

html body .page-crumbs a:focus-visible {
  outline: 2px solid var(--inner-heading);
  outline-offset: 2px;
}

/* Page title */

html body .legal-hero.legal-hero--policy {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  padding: var(--inner-title-top) 20px var(--inner-title-bottom);
  display: block;
  background: var(--inner-page);
  color: var(--inner-heading);
}

html body .legal-hero::after,
html body .legal-hero.legal-hero--policy::before {
  display: none;
}

html body .legal-hero .legal-hero__inner {
  position: relative;
  z-index: 1;
}

html body .legal-hero.legal-hero--policy .legal-hero__inner {
  width: min(100%, 880px);
  padding: 0;
}

html body .legal-hero.legal-hero--policy .legal-hero__inner h1 {
  max-width: none;
  margin: 0;
  color: var(--inner-heading);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-indent: 0;
  text-shadow: none;
  text-wrap: balance;
}

/* Document page: related pages beside the content card */

html body .legal-layout {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--inner-doc-width));
  margin: 0 auto;
  padding: 0 0 clamp(64px, 7vw, 104px);
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
}

html body .legal-layout > .legal-content {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  padding: 48px 56px 56px;
  border: 1px solid var(--inner-line);
  border-radius: 8px;
  background: var(--inner-card);
  box-shadow: var(--inner-card-shadow);
}

html body .page-rail {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--brand-page-header-height, 64px) + 24px);
  padding-top: 4px;
}

/* The list is labelled for assistive tech by the nav itself; on screen the
   label only repeated the first link. */
html body .page-rail__title {
  display: none;
}

html body .page-rail ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  list-style: none;
}

html body .page-rail li {
  margin: 0;
  padding: 0;
}

html body .page-rail a {
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  color: var(--inner-muted);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

html body .page-rail a:hover {
  background: var(--inner-band);
  color: var(--inner-heading);
}

html body .page-rail a[aria-current="page"] {
  background: var(--inner-inset);
  color: var(--inner-heading);
  font-weight: 600;
}

html body .page-rail a:focus-visible {
  outline: 2px solid var(--inner-heading);
  outline-offset: 2px;
}

/* Card contents */

html body .legal-content {
  color: var(--inner-text);
  font-size: 16px;
  line-height: 1.85;
}

html body .legal-content > :first-child {
  margin-top: 0;
}

html body .legal-content .lead {
  color: var(--inner-text);
  font-size: 17px;
  line-height: 1.85;
}

html body .legal-content h2 {
  margin: 44px 0 14px;
  padding: 0;
  color: var(--inner-heading);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.45;
  scroll-margin-top: 92px;
}

html body .legal-content h3 {
  margin: 26px 0 8px;
  color: var(--inner-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

html body .legal-content .legal-document-meta {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--inner-line);
}

html body .legal-content .join-us-team-photo {
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
}

html body .legal-content .callout,
html body .legal-content .callout--warm,
html body .legal-content .plain-card {
  border-radius: 6px;
  background: var(--inner-inset);
}

html body .legal-content .key-value {
  margin-block: 18px 26px;
}

html body .legal-content .key-value > div {
  padding-block: 11px;
  border-color: var(--inner-line);
}

html body .legal-content .steps li::before {
  background: var(--inner-inset);
  color: var(--inner-heading);
}

html body .legal-content .legal-contact {
  margin-top: 44px;
  padding: 28px 32px;
  border-color: var(--inner-line);
  background: var(--inner-inset);
}

html body .legal-content .legal-contact h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

html body .legal-content .contact-page {
  background: transparent;
}

html body .legal-content .contact-field input,
html body .legal-content .contact-field textarea,
html body .legal-content .contact-field select {
  background: var(--inner-field);
}

html body .legal-content .company-button--secondary {
  background: transparent;
}

html body .legal-content .company-application legend {
  padding: 0;
}

html body .legal-content .company-review div {
  border-bottom-color: var(--inner-line);
}

/* Shared content blocks */

html body .company-columns {
  margin: 20px 0 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

html body .company-columns--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html body .company-columns > div {
  min-width: 0;
  padding: 20px 22px;
  border-radius: 6px;
  background: var(--inner-inset);
}

html body .company-columns h3 {
  margin: 0 0 8px;
}

html body .company-columns p:last-child,
html body .company-columns ul:last-child {
  margin-bottom: 0;
}

html body .company-faq {
  margin-top: 8px;
}

html body .company-faq > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--inner-line);
}

html body .company-faq > div:last-child {
  border-bottom: 0;
}

html body .company-faq h3 {
  margin: 0 0 6px;
}

html body .company-faq p {
  margin: 0;
}

html body .company-note {
  color: var(--inner-muted);
  font-size: 14px;
}

/* Story page */

html:has(.story-page) {
  scroll-padding-top: var(--brand-page-header-height, 64px);
}

html body .story-hero {
  position: relative;
  padding: 0 var(--brand-chrome-inline, 20px);
  text-align: center;
}

html body .story-hero__inner {
  width: min(100%, 880px);
  margin: 0 auto;
  padding-block: clamp(104px, 9vw, 144px) clamp(48px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The page name reads as a label above the headline. */
html body .story-hero h1 {
  order: 1;
  margin: 0 0 20px;
  color: var(--inner-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
}

html body .story-hero__display {
  order: 2;
  margin: 0;
  color: var(--inner-heading);
  font-size: clamp(34px, 5.2vw, 68px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

html body .story-hero__intro {
  order: 3;
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--inner-muted);
  font-size: 17px;
  line-height: 1.8;
  text-wrap: pretty;
}

/* Section tabs: one rounded group of equal-height buttons. */
html body .story-tabs {
  order: 4;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: clamp(32px, 4vw, 48px);
  padding: 5px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--inner-line);
  border-radius: 999px;
  background: var(--inner-band);
}

html body .story-tabs a {
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--inner-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

html body .story-tabs a:hover {
  background: var(--inner-card);
  color: var(--inner-heading);
  box-shadow: 0 1px 2px rgba(16, 39, 75, 0.14);
}

html body .story-tabs a:focus-visible {
  outline: 2px solid var(--inner-heading);
  outline-offset: 2px;
}

html body .story-page .join-us-team-photo {
  width: min(calc(100% - 2 * var(--brand-chrome-inline, 20px)), var(--inner-wide-width));
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--inner-band) !important;
}

html body .story-page .join-us-team-photo img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 20 / 9;
  object-fit: cover;
  object-position: 50% 100%;
  border-radius: 0;
}

html body .story-body {
  color: var(--inner-text);
  font-size: 16px;
  line-height: 1.85;
}

html body .story-body > .company-section {
  padding-block: clamp(64px, 7.5vw, 104px);
  padding-inline: max(20px, var(--brand-chrome-inline, 20px), calc((100% - var(--inner-wide-width)) / 2));
  scroll-margin-top: 0;
}

html body .story-body > .company-section:nth-of-type(even) {
  background: var(--inner-band);
}

html body .story-body h2 {
  margin: 0 0 clamp(26px, 3vw, 40px);
  color: var(--inner-heading);
  font-size: clamp(26px, 2.7vw, 34px);
  font-weight: 600;
  line-height: 1.35;
}

html body .story-body h3 {
  margin: 0 0 10px;
  color: var(--inner-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

html body .story-body p {
  margin: 0 0 14px;
}

html body .story-body .inline-link {
  color: var(--inner-heading);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(16, 39, 75, 0.35);
  text-underline-offset: 4px;
}

/* A section that is only text reads as a heading beside a paragraph. */
html body .story-body > .company-section:not(:has(.company-columns, .steps, .company-faq)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: clamp(32px, 6vw, 96px);
}

html body .story-body > .company-section:not(:has(.company-columns, .steps, .company-faq)) > h2 {
  grid-row: 1 / span 6;
  margin: 0;
}

html body .story-body > .company-section:not(:has(.company-columns, .steps, .company-faq)) > :not(h2) {
  grid-column: 2;
  font-size: 18px;
}

html body .story-body .company-columns {
  margin: 0;
  gap: 16px;
}

html body .story-body .company-columns > div {
  padding: clamp(24px, 2.6vw, 34px);
  border: 1px solid var(--inner-line);
  border-radius: 10px;
  background: var(--inner-card);
}

html body .story-body .company-columns ul {
  margin: 0;
  padding-left: 20px;
}

html body .story-body .company-note {
  margin: 20px 0 0;
}

html body .story-body .steps {
  margin: 0 !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

html body .story-body .steps li {
  min-height: 0;
  margin: 0;
  padding: clamp(24px, 2.6vw, 34px);
  border: 1px solid var(--inner-line);
  border-radius: 10px;
  background: var(--inner-card);
}

html body .story-body .steps li br {
  display: none;
}

html body .story-body .steps li strong {
  display: block;
  margin-bottom: 8px;
  color: var(--inner-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

html body .story-body .steps li::before {
  position: static;
  width: auto;
  height: auto;
  display: block;
  margin-bottom: 14px;
  border-radius: 0;
  background: none;
  color: var(--inner-muted);
  font-size: 13px;
  font-weight: 500;
  place-items: initial;
}

html body .story-body .company-faq {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
}

html body .story-body .company-faq > div {
  padding: 22px 0;
  border-bottom: 1px solid var(--inner-line);
}

html body .story-body .company-faq > div:last-child {
  border-bottom: 1px solid var(--inner-line);
}

html body .story-body .company-faq h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

html body .story-body .company-faq p {
  margin: 0;
  color: var(--inner-muted);
  font-size: 15px;
}

html body .company-operator {
  margin-top: 28px;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 40px;
  border-top: 1px solid var(--inner-line);
  color: var(--inner-muted);
  font-size: 14px;
}

html body .company-operator p {
  margin: 0;
}

html body .story-body .company-operator + .inline-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
}

html body .story-body > .legal-contact {
  margin: 0;
  padding: clamp(64px, 7.5vw, 104px) 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: var(--inner-page);
  text-align: center;
}

html body .story-body > .legal-contact h2 {
  margin: 0 0 12px;
}

html body .story-body > .legal-contact p {
  max-width: 620px;
  margin: 0 0 26px;
  color: var(--inner-muted);
}

/* Contact */

html body .contact-layout {
  width: min(calc(100% - 40px), 960px);
  padding-block: 0 clamp(64px, 7vw, 104px);
  display: block;
}

html body .contact-intro {
  max-width: none;
  text-align: center;
}

html body .contact-help-lead {
  margin: 0 0 20px;
  color: var(--inner-text);
  font-size: 16px;
}

html body .contact-help-lead a {
  color: var(--inner-heading);
  text-decoration: underline;
  text-underline-offset: 4px;
}

html body .contact-shortcuts {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

html body .contact-shortcuts a {
  min-height: 76px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--inner-line);
  border-radius: 8px;
  background: var(--inner-card);
  color: var(--inner-heading);
  font-size: 16px;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

html body .contact-shortcuts a:hover {
  border-color: var(--inner-line-strong);
  background: var(--inner-inset);
  color: var(--inner-heading);
}

html body .contact-shortcuts svg {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: var(--inner-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html body .contact-lead {
  max-width: 680px;
  margin: 0 auto 10px;
  color: var(--inner-text);
  font-size: 16px;
  line-height: 1.85;
}

html body .contact-teacher-route {
  margin: 0 0 22px;
  color: var(--inner-muted);
  font-size: 15px;
}

/* A link wraps as one piece instead of splitting mid-phrase. */
html body .contact-teacher-route a {
  white-space: nowrap;
}

html body .contact-response-details {
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 48px;
  border: 0;
}

html body .contact-response-details > div {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 10px;
  border: 0;
}

html body .contact-main {
  margin: 0;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--inner-line);
  border-radius: 8px;
  background: var(--inner-card);
  box-shadow: var(--inner-card-shadow);
}

html body .contact-main .contact-field input,
html body .contact-main .contact-field textarea,
html body .contact-main .contact-field select,
html body .contact-main .contact-select > summary,
html body .contact-main .contact-select__options {
  background: var(--inner-field);
}

/* Help centre */

html body .legal-hero.legal-hero--policy.hc-hero {
  padding-bottom: 32px;
}

html body .legal-hero.legal-hero--policy.hc-hero .legal-hero__inner {
  width: min(100%, 720px);
}

/* Category and article views keep the title for assistive tech only. */
html body .legal-hero.legal-hero--policy.hc-hero.hc-hero--collapsed {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
}

html body .hc-search__input {
  border: 1px solid var(--inner-line-strong);
  box-shadow: 0 1px 2px rgba(16, 39, 75, 0.05);
}

html body .hc-search__input:focus {
  border-color: var(--inner-heading);
  box-shadow: 0 0 0 3px rgba(16, 39, 75, 0.14);
}

html body .hc-popular-topics {
  color: var(--inner-muted);
}

html body .hc-popular-topics button {
  color: var(--inner-heading);
}

html body .hc-hero button:focus-visible {
  outline-color: var(--inner-heading);
}

/* Category and article views bring their own top padding. */
html body .hc-shell {
  width: min(calc(100% - 40px), var(--inner-doc-width));
  padding-top: 8px;
}

html body .hc-category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

html body .hc-category-card {
  min-height: 104px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 18px;
  border-color: var(--inner-line);
  border-radius: 8px;
}

html body .hc-category-card__top {
  display: contents;
}

html body .hc-category-card__icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}

html body .hc-category-card__count {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

html body .hc-category-card strong {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

html body .hc-category-card > span:last-child {
  grid-column: 2;
  grid-row: 2;
  margin-top: 4px;
}

/* Watch page */

html body .watch-hero {
  position: relative;
  box-sizing: border-box;
  padding: var(--inner-title-top) 20px clamp(32px, 3.6vw, 48px);
  border: 0;
  background: var(--inner-page);
  text-align: center;
}

html body .watch-hero__inner {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 0;
}

html body .watch-hero h1 {
  max-width: none;
  color: var(--inner-heading);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

html body .watch-eyebrow {
  color: var(--inner-muted);
}

html body .watch-hero__summary {
  margin-inline: auto;
  color: var(--inner-muted);
}

html body .watch-layout {
  width: min(calc(100% - 40px), var(--inner-doc-width));
  padding-top: 0;
}

html body .watch-player {
  margin-top: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--inner-card-shadow);
}

html body .watch-article {
  width: auto;
  max-width: none;
  margin-top: 24px;
  padding: 48px 56px 56px;
  border: 1px solid var(--inner-line);
  border-radius: 8px;
  background: var(--inner-card);
}

html body .watch-cta {
  border-color: var(--inner-line);
  background: var(--inner-inset);
}

html body .watch-cta a {
  border-radius: 999px;
}

/* A heading that receives focus after in-page navigation needs no ring. */
html body .hc-shell h2:focus,
html body .hc-shell h2:focus-visible {
  outline: none;
}

/* Not found */

html body .legal-hero.legal-hero--policy:has(+ .not-found-content) {
  min-height: clamp(360px, 62vh, 640px);
  padding-block: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

html body .not-found-content {
  min-height: 0;
  padding: 0;
}

/* Tablet and phone */

@media (max-width: 960px) {
  html body .legal-layout {
    width: 100%;
    padding-bottom: 0;
    display: block;
  }

  html body .legal-layout > .legal-content {
    margin: 0;
    padding: 32px 20px 44px;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
  }

  html body .page-rail {
    position: relative;
    top: auto;
    padding: 0;
    background: var(--inner-page);
  }

  html body .page-rail ul {
    padding: 8px 16px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  html body .page-rail ul::-webkit-scrollbar {
    display: none;
  }

  html body .page-rail a {
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-radius: 999px;
    white-space: nowrap;
  }

  html body .page-rail a[aria-current="page"] {
    background: rgba(16, 39, 75, 0.08);
  }

  :root {
    --inner-title-top: 76px;
    --inner-title-bottom: 28px;
  }

  html body .legal-hero.legal-hero--policy {
    padding-inline: 16px;
  }

  html body .page-crumbs {
    height: 44px;
    padding-inline: 16px;
    font-size: 13px;
  }

  html body .page-crumbs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  html body .legal-hero.legal-hero--policy .legal-hero__inner h1 {
    font-size: clamp(28px, 7.4vw, 36px);
  }

  html body .legal-hero.legal-hero--policy.hc-hero {
    padding-bottom: 24px;
  }

  html body .hc-category-page,
  html body .hc-article-page {
    padding-top: 16px;
  }

  html body .story-body > .company-section:not(:has(.company-columns, .steps, .company-faq)) {
    display: block;
  }

  html body .story-body > .company-section:not(:has(.company-columns, .steps, .company-faq)) > h2 {
    margin-bottom: 20px;
  }

  html body .story-body > .company-section:not(:has(.company-columns, .steps, .company-faq)) > :not(h2) {
    font-size: 16px;
  }

  html body .story-body .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body .watch-hero {
    padding: var(--inner-title-top) 16px 28px;
  }

  html body .watch-article {
    padding: 32px 24px 40px;
  }
}

@media (max-width: 680px) {
  html body .company-columns,
  html body .company-columns--two,
  html body .story-body .steps,
  html body .story-body .company-faq,
  html body .contact-shortcuts,
  html body .hc-category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html body .hc-popular-topics {
    font-size: 13px;
  }

  html body .contact-shortcuts {
    margin-bottom: 36px;
    gap: 10px;
  }

  html body .contact-shortcuts a {
    min-height: 64px;
  }

  html body .contact-response-details {
    flex-direction: column;
    gap: 14px;
  }

  /* Label above value, so the two centred pairs line up. */
  html body .contact-response-details > div {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  html body .story-page .join-us-team-photo img {
    aspect-ratio: 16 / 10;
  }

  html body .story-hero__inner {
    padding-block: 84px 40px;
  }

  html body .story-hero__intro {
    font-size: 16px;
  }

  html body .story-page .join-us-team-photo {
    border-radius: 12px;
  }

  html body .legal-content .legal-contact {
    padding: 24px 20px;
  }

  html body .hc-category-card {
    min-height: 88px;
    padding: 16px 18px;
    column-gap: 14px;
  }

  html body .hc-category-card__count {
    display: none;
  }

  html body .hc-category-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }
}

/* Narrow phones: the section tabs become a two-column block. */
@media (max-width: 560px) {
  html body .story-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 16px;
  }

  html body .story-tabs a {
    padding: 0 10px;
    border-radius: 11px;
    font-size: 14px;
    text-align: center;
    white-space: normal;
  }

  html body .story-tabs a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Comfortable tap targets for text links on phones. */
@media (max-width: 760px) {
  html body .hc-breadcrumb button {
    min-height: 44px;
  }
}

@media (max-width: 500px) {
  /* Inline padding widens the tap area without stretching the line box. */
  html body .inline-link,
  html body .contact-teacher-route a {
    padding-block: 13px;
  }

  html body .legal-content > .inline-link,
  html body .legal-content > p > .inline-link:only-child,
  html body .hc-contact-card a,
  html body .contact-response-details a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Keep the 44px tap area without opening a gap under the label. */
  html body .contact-response-details a {
    margin-block: -10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .page-rail a,
  html body .story-tabs a,
  html body .contact-shortcuts a {
    transition: none;
  }
}
