/* The Saduo landing site. Everything comes from the shared tokens and the design direction
   (studio/design/design-direction.md): flat colours, one typeface, the type and spacing scales,
   no gradient, no shadow, no script. Light or dark follows the system. */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
  transition: color var(--dur-color) var(--ease);
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--space-200);
  top: -100px;
  z-index: 10;
  padding: var(--space-075) var(--space-200);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.skip:focus {
  top: var(--space-200);
}

/* Header and footer share one bar */
.bar-card {
  display: contents;
}

.blink {
  display: none;
}

.bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-200) var(--space-300);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-200) var(--space-400);
}

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

.logo {
  display: block;
  line-height: 0;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

.bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-100) var(--space-300);
}

.primary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-050) var(--space-200);
}

.primary a,
.legal a {
  color: var(--text);
  text-decoration: none;
  font-weight: var(--fw-medium);
  padding: var(--space-075) 0;
}

.primary a:hover,
.legal a:hover {
  text-decoration: underline;
}

.lang {
  display: flex;
  gap: var(--space-200);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.lang strong {
  color: var(--heading);
  font-weight: var(--fw-semibold);
}

/* Page */
/* Sections are full width so a style can give one a band; .wrap holds the reading width. */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-300);
}

.hero {
  padding: var(--space-900) 0 var(--space-800);
}

h1 {
  max-width: 680px;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: var(--fw-semibold);
  color: var(--heading);
  text-wrap: balance;
}

.lead {
  max-width: 680px;
  margin-top: var(--space-300);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-wrap: pretty;
}

.hero-copy p:last-child {
  margin-top: var(--space-400);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-600);
  padding: var(--space-100) var(--space-300);
  background: var(--primary-bg);
  color: var(--primary-text);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition:
    background-color var(--dur-color) var(--ease),
    transform var(--dur-color) var(--ease);
}

.cta:hover {
  background: var(--primary-hover);
  color: var(--primary-text);
}

.cta:active {
  transform: translateY(1px);
}

.section {
  padding: var(--space-800) 0;
  scroll-margin-top: var(--space-300);
}

h2 {
  max-width: 680px;
  margin-bottom: var(--space-400);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-semibold);
  color: var(--heading);
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-semibold);
  color: var(--heading);
}

/* Apps: plain rows, no cards, no icons */
.apps {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.app {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: baseline;
  gap: var(--space-100) var(--space-300);
  padding: var(--space-300) 0;
  border-bottom: 1px solid var(--line);
}

.app-text {
  max-width: 680px;
  text-wrap: pretty;
}

.app-link {
  font-weight: var(--fw-semibold);
  padding: var(--space-075) 0;
}

/* Tabs: the current page is marked */
.primary a[aria-current='page'] {
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 0.5em;
}

/* Inner pages open with a smaller band than the home page */
.page-hero {
  padding: var(--space-700) 0 var(--space-600);
}

.page-hero .lead {
  max-width: 680px;
}

/* Home: three ways on to the other pages */
.teasers {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-300);
}

.teaser {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-100);
  height: 100%;
  min-height: 200px;
  padding: var(--space-400) var(--space-300);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  transition:
    transform var(--dur-move) var(--ease),
    border-color var(--dur-color) var(--ease);
}

.teaser:hover {
  transform: translateY(calc(var(--space-050) * -1));
  border-color: var(--muted);
}

.teaser p {
  flex: 1;
  color: var(--muted);
  text-wrap: pretty;
}

/* An arrow drawn with borders: a short line and a corner. */
.teaser-go {
  position: relative;
  width: var(--space-400);
  height: var(--space-200);
  transition: transform var(--dur-move) var(--ease);
}

.teaser-go::before {
  content: '';
  position: absolute;
  left: 0;
  right: 2px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--heading);
  border-radius: 1px;
}

.teaser-go::after {
  content: '';
  position: absolute;
  right: 1px;
  top: 50%;
  width: var(--space-075);
  height: var(--space-075);
  margin-top: -5px;
  border-top: 2px solid var(--heading);
  border-right: 2px solid var(--heading);
  transform: rotate(45deg);
}

.teaser:hover .teaser-go {
  transform: translateX(var(--space-075));
}

/* Wider screens get a wider page; small phones a smaller opening line. */
@media (min-width: 1400px) {
  .wrap,
  .bar,
  .missing {
    max-width: 1240px;
  }
}

/* Only the Nhip style shows the small pictures, the kind label and the moving line. */
.app-art,
.app-kind,
.ticker {
  display: none;
}

/* The name in Morse code */
.morse {
  display: grid;
  grid-template-columns: 224px minmax(0, 680px);
  gap: var(--space-700);
  align-items: start;
}

.mark img {
  display: block;
  width: 224px;
  height: 224px;
}

.morse-text p {
  text-wrap: pretty;
}

.legend-title {
  margin-top: var(--space-400);
  margin-bottom: var(--space-200);
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: var(--fw-medium);
  color: var(--muted);
}

.legend {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-100);
}

.legend li {
  display: flex;
  align-items: center;
  gap: var(--space-200);
}

.letter {
  width: var(--space-300);
  font-weight: var(--fw-semibold);
  color: var(--heading);
}

/* The unit of the mark: a dot, and a dash three times as long with round ends. */
.signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-075);
  min-height: var(--space-300);
}

.m-dot,
.m-dash {
  display: block;
  height: var(--space-100);
  border-radius: var(--space-075);
}

.m-dot {
  width: var(--space-100);
  background: var(--primary-bg);
}

.m-dash {
  width: calc(var(--space-100) * 3);
  background: var(--muted);
}

/* Questions */
.faq {
  max-width: 680px;
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  padding: var(--space-200) 0;
  font-weight: var(--fw-medium);
  cursor: pointer;
}

details p {
  padding-bottom: var(--space-200);
  text-wrap: pretty;
}

/* Footer */
.foot {
  margin-top: var(--space-800);
  border-top: 1px solid var(--line);
}

.foot .bar {
  padding-block: var(--space-400);
}

.foot p {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-050) var(--space-300);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

/* Not found */
.missing {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: var(--space-300);
  padding-top: var(--space-900);
  padding-bottom: var(--space-900);
}

.missing h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}

@media (max-width: 800px) {
  .morse {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-400);
  }

  .mark img {
    width: 160px;
    height: 160px;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: var(--space-700) 0 var(--space-600);
  }

  .section {
    padding: var(--space-600) 0;
  }

  .foot {
    margin-top: var(--space-600);
  }
}

@media (prefers-reduced-motion: reduce) {
  a,
  .cta {
    transition: none;
  }

  .cta:active {
    transform: none;
  }
}

/* Style "Nhip" (rhythm), the default. A Navy opening with the mark that assembles row by row and
   follows the pointer, a moving line of the name in Morse, two large app panels with a small
   animated picture each, and sections that rise in as they are reached. Colours come from the
   header tokens; every movement is off with prefers-reduced-motion (and motion.js does nothing). */

.s-nhip .top {
  background: var(--header-bg);
  border-bottom: 0;
  padding-top: var(--space-200);
}

/* The bar is one long card: Fog on the Navy opening, with a dot and a dash blinking beside the logo. */
.s-nhip .top .bar {
  padding-block: 0;
}

.s-nhip .bar-card {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: var(--space-300);
  padding: var(--space-100) var(--space-300);
  background: var(--header-text);
  color: var(--lang-on-text);
  border-radius: var(--radius-lg);
}

.s-nhip .bar-right {
  margin-left: auto;
}

.s-nhip .blink {
  display: inline-flex;
  gap: var(--space-075);
}

.s-nhip .blink i {
  display: block;
  width: var(--space-100);
  height: var(--space-100);
  border-radius: var(--space-075);
  background: var(--lang-on-text);
  opacity: 0.25;
}

.s-nhip .blink i:last-child {
  width: var(--space-400);
}

.s-nhip .top a:focus-visible,
.s-nhip .hero a:focus-visible {
  outline-color: var(--header-text);
}

.s-nhip .bar-card a:focus-visible {
  outline-color: var(--lang-on-text);
}

.s-nhip .primary a {
  position: relative;
  color: var(--lang-on-text);
  padding: var(--space-075) var(--space-100);
  border-radius: var(--radius-sm);
  transition: background-color var(--dur-color) var(--ease);
}

.s-nhip .primary a:hover {
  background: var(--lang-on-bg);
  text-decoration: none;
}

.s-nhip .hero {
  overflow: hidden;
  background: var(--header-bg);
  color: var(--header-text);
  padding: var(--space-800) 0 0;
}

.s-nhip .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-500);
}

.s-nhip h1 {
  max-width: none;
  color: var(--header-text);
}

.s-nhip .lead {
  color: var(--header-text);
}

.s-nhip .cta {
  background: var(--header-text);
  color: var(--header-bg);
}

.s-nhip .cta:hover {
  background: var(--header-muted);
  color: var(--header-bg);
}

.mark-live {
  display: block;
  width: 280px;
  height: 280px;
}

.s-nhip .morse {
  grid-template-columns: minmax(0, 680px);
}

/* The network behind the mark */
.s-nhip .hero-art {
  position: relative;
}

.net {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  pointer-events: none;
}

.s-nhip .mark-live {
  position: relative;
}

.net path {
  fill: none;
  stroke: var(--header-border);
  stroke-width: 1.5;
}

.net .net-ring {
  opacity: 0.5;
}

.net .net-pulse {
  stroke: var(--header-text);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
}

.net .net-node {
  fill: var(--header-muted);
}

.s-nhip h1 .ln-0,
.s-nhip h1 .ln-1 {
  display: block;
}

.s-nhip h1 .ln-1 {
  color: var(--header-muted);
}

.s-nhip .hero-art {
  perspective: 900px;
}

.s-nhip .mark-live {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--dur-move) var(--ease);
}

/* Moving line: the name in Morse, repeated */
.s-nhip .ticker {
  display: block;
  overflow: hidden;
  margin-top: var(--space-700);
  padding: var(--space-300) 0;
  border-top: 1px solid var(--header-border);
}

.ticker-track {
  display: flex;
  width: max-content;
}

.tk-letter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-100);
  margin-right: var(--space-600);
}

.s-nhip .ticker .m-dot {
  background: var(--header-text);
}

.s-nhip .ticker .m-dash {
  background: var(--header-muted);
}

/* Apps: two large panels */
.s-nhip #ung-dung h2:not(.pcard-name) {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}

.s-nhip .apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-300);
  border-top: 0;
}

.s-nhip .app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-100);
  padding: var(--space-400);
  border: 0;
  border-radius: var(--radius-lg);
  min-height: 440px;
  transition: transform var(--dur-move) var(--ease);
}

.s-nhip .app-evez {
  background: var(--header-bg);
  color: var(--header-text);
}

.s-nhip .app-dotx {
  background: var(--header-muted);
  color: var(--lang-on-text);
}

.s-nhip .app {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.s-nhip .app:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(calc(var(--space-100) * -1));
}

.s-nhip .app-art {
  display: block;
  width: 200px;
  margin-bottom: var(--space-200);
  transition: transform var(--dur-move) var(--ease);
}

.s-nhip .app:hover .app-art {
  transform: scale(1.06);
}

.s-nhip .app-art svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}

.s-nhip .app-kind {
  display: block;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-medium);
  opacity: 0.8;
}

.s-nhip .app-name {
  color: inherit;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}

.s-nhip .app-text {
  flex: 1;
  max-width: 34ch;
}

.s-nhip .app-link {
  color: inherit;
  padding: var(--space-100) var(--space-300);
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition:
    background-color var(--dur-color) var(--ease),
    color var(--dur-color) var(--ease);
}

.s-nhip .app-evez .app-link:hover {
  background: var(--header-text);
  color: var(--header-bg);
}

.s-nhip .app-dotx .app-link:hover {
  background: var(--lang-on-text);
  color: var(--header-muted);
}

.s-nhip .app a:focus-visible {
  outline-color: currentColor;
}

/* The little pictures */
.ln,
.pts circle {
  fill: currentColor;
}

.bx {
  fill: currentColor;
  opacity: 0.25;
}

.chip circle,
.chip rect {
  fill: currentColor;
}

.chip .chip-bg {
  opacity: 0.16;
}

.chip .soft {
  opacity: 0.5;
}

/* Morse section: larger signs */
.s-nhip .legend {
  gap: var(--space-200);
}

.s-nhip .letter {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  width: var(--space-500);
}

.s-nhip .legend .m-dot {
  width: var(--space-300);
  height: var(--space-300);
  border-radius: var(--space-100);
}

.s-nhip .legend .m-dash {
  width: calc(var(--space-300) * 3);
  height: var(--space-300);
  border-radius: var(--space-100);
}

.s-nhip .legend .signal {
  gap: var(--space-100);
}

@media (max-width: 800px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  .net {
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
  }

  .s-nhip .blink {
    display: none;
  }

  .s-nhip .bar-card {
    padding: var(--space-100) var(--space-200);
  }

  .s-nhip .apps {
    grid-template-columns: minmax(0, 1fr);
  }

  .s-nhip .app {
    min-height: 0;
  }

  .s-nhip .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-500);
  }

  .s-nhip .hero-art {
    order: -1;
  }

  .mark-live {
    width: 160px;
    height: 160px;
  }

  .s-nhip .ticker {
    margin-top: var(--space-600);
  }
}

@media (max-width: 640px) {
  .s-nhip .hero {
    padding: var(--space-600) 0 var(--space-700);
  }

  .s-nhip .legend .m-dot {
    width: var(--space-200);
    height: var(--space-200);
  }

  .s-nhip .legend .m-dash {
    width: calc(var(--space-200) * 3);
    height: var(--space-200);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes mk-in {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }

  @keyframes float {
    50% {
      transform: translateY(-10px);
    }
  }

  @keyframes slide {
    to {
      transform: translateX(-12.5%);
    }
  }

  @keyframes draw-h {
    0%,
    4% {
      transform: scaleX(0);
    }
    14%,
    86% {
      transform: scaleX(1);
    }
    94%,
    100% {
      transform: scaleX(0);
    }
  }

  @keyframes draw-v {
    0%,
    4% {
      transform: scaleY(0);
    }
    14%,
    86% {
      transform: scaleY(1);
    }
    94%,
    100% {
      transform: scaleY(0);
    }
  }

  @keyframes fill {
    0%,
    14% {
      opacity: 0;
    }
    24%,
    86% {
      opacity: 0.25;
    }
    94%,
    100% {
      opacity: 0;
    }
  }

  @keyframes chip {
    0%,
    3% {
      opacity: 0;
      transform: translateX(28px);
    }
    13%,
    85% {
      opacity: 1;
      transform: none;
    }
    94%,
    100% {
      opacity: 0;
      transform: translateX(-28px);
    }
  }

  .mk-row {
    animation: mk-in var(--dur-move) var(--ease) both;
  }

  .mk-r1 { animation-delay: 160ms; }
  .mk-r2 { animation-delay: 320ms; }
  .mk-r3 { animation-delay: 480ms; }
  .mk-r4 { animation-delay: 640ms; }

  .s-nhip .hero-art {
    animation: float 7s ease-in-out 1.2s infinite;
  }

  .s-nhip h1 .ln-0 { animation: mk-in 700ms var(--ease) both; }
  .s-nhip h1 .ln-1 { animation: mk-in 700ms var(--ease) 200ms both; }
  .s-nhip .lead { animation: mk-in 700ms var(--ease) 400ms both; }
  .s-nhip .cta-row,
  .s-nhip .hero-copy p:last-child { animation: mk-in 700ms var(--ease) 550ms both; }

  .ticker-track {
    animation: slide 24s linear infinite;
  }

  .foot-ticker .ticker-track {
    animation-direction: reverse;
    animation-duration: 36s;
  }

  @keyframes blink {
    0%,
    100% {
      opacity: 0.25;
    }
    30%,
    60% {
      opacity: 1;
    }
  }

  .s-nhip .blink i {
    animation: blink 2.4s var(--ease) infinite;
  }

  .s-nhip .blink i:nth-child(2) { animation-delay: 0.25s; }
  .s-nhip .blink i:nth-child(3) { animation-delay: 0.5s; }

  @keyframes travel {
    0% {
      stroke-dasharray: 0 100;
      stroke-dashoffset: 0;
    }
    8% {
      stroke-dasharray: 14 86;
      stroke-dashoffset: 0;
    }
    50% {
      stroke-dasharray: 14 86;
      stroke-dashoffset: -86;
    }
    58%,
    100% {
      stroke-dasharray: 0 100;
      stroke-dashoffset: -100;
    }
  }

  @keyframes node {
    0%,
    100% {
      transform: scale(1);
      opacity: 0.7;
    }
    50% {
      transform: scale(1.5);
      opacity: 1;
    }
  }

  .net .net-pulse {
    animation: travel 5s var(--ease) infinite;
  }

  .net .net-node {
    transform-box: fill-box;
    transform-origin: center;
    animation: node 5s var(--ease) infinite;
  }

  .net .p1, .net .n1 { animation-delay: 0.8s; }
  .net .p2, .net .n2 { animation-delay: 1.6s; }
  .net .p3, .net .n3 { animation-delay: 2.4s; }
  .net .p4, .net .n4 { animation-delay: 3.2s; }
  .net .p5, .net .n5 { animation-delay: 4s; }

  .ln-h {
    transform-box: fill-box;
    transform-origin: left center;
    animation: draw-h 9s var(--ease) infinite both;
  }

  .ln-v {
    transform-box: fill-box;
    transform-origin: center top;
    animation: draw-v 9s var(--ease) infinite both;
  }

  .bx {
    animation: fill 9s var(--ease) infinite both;
  }

  .chip {
    animation: chip 8s var(--ease) infinite both;
  }

  .d1 { animation-delay: 0.6s; }
  .d2 { animation-delay: 1.2s; }
  .d3 { animation-delay: 1.8s; }
  .d4 { animation-delay: 2.4s; }
  .d5 { animation-delay: 3s; }
  .d6 { animation-delay: 3.6s; }
  .d7 { animation-delay: 4.2s; }
  .d8 { animation-delay: 4.8s; }
  .d9 { animation-delay: 5.4s; }
  .chip.d1 { animation-delay: 0.7s; }
  .chip.d2 { animation-delay: 1.4s; }

  /* The pictures run only while their panel is on screen (motion.js adds .in). */
  .js .app-art * {
    animation-play-state: paused;
  }

  .js .app.in .app-art * {
    animation-play-state: running;
  }

  /* Sections rise in once. Without motion.js nothing is hidden. */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity 700ms var(--ease),
      transform 700ms var(--ease);
  }

  .js [data-reveal].in {
    opacity: 1;
    transform: none;
  }

  .js .app:nth-child(2) {
    transition-delay: 140ms;
  }

  .js .legend li {
    opacity: 0;
    transform: translateX(-24px);
    transition:
      opacity 600ms var(--ease),
      transform 600ms var(--ease);
  }

  .js .legend.in li {
    opacity: 1;
    transform: none;
  }

  .js .legend.in li:nth-child(2) { transition-delay: 120ms; }
  .js .legend.in li:nth-child(3) { transition-delay: 240ms; }
  .js .legend.in li:nth-child(4) { transition-delay: 360ms; }
  .js .legend.in li:nth-child(5) { transition-delay: 480ms; }
}

/* ---- Tabs, inner pages, home links, and every screen size ---- */

.s-nhip .primary {
  gap: var(--space-050);
}

.s-nhip .primary a[aria-current='page'] {
  background: var(--lang-on-text);
  color: var(--header-text);
  text-decoration: none;
}

.s-nhip .primary a[aria-current='page']:hover {
  background: var(--lang-on-text);
}

.s-nhip .page-hero {
  padding: var(--space-700) 0 var(--space-700);
}

.s-nhip .page-hero .hero-grid {
  grid-template-columns: minmax(0, 1fr);
}

.s-nhip .page-hero h1 {
  max-width: 760px;
}

.s-nhip .teaser {
  background: var(--surface);
}

.s-nhip .teaser h3 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

.s-nhip .teaser:hover {
  border-color: var(--heading);
}

.s-nhip.p-name .morse {
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-700);
  align-items: center;
}

.s-nhip.p-name .mark .mark-live {
  width: 280px;
  height: 280px;
}

.s-nhip .foot-grid {
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
}

@media (max-width: 1000px) {
  .s-nhip .foot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .s-nhip .foot-brand {
    grid-column: 1 / -1;
  }
}

/* Tablet and phone: the card keeps the logo and the language on the first row, the tabs get their own row and scroll sideways if they ever do not fit. */
@media (max-width: 800px) {
  .s-nhip .bar-card {
    min-width: 0;
    flex-wrap: wrap;
    gap: var(--space-100) var(--space-200);
  }

  .s-nhip .bar-right {
    display: contents;
  }

  .s-nhip .bar-card .logo {
    order: 1;
  }

  .s-nhip .bar-card .lang {
    order: 2;
    margin-left: auto;
  }

  .s-nhip .bar-card .primary {
    order: 3;
    min-width: 0;
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .s-nhip .primary a {
    white-space: nowrap;
  }

  .s-nhip .page-hero {
    padding: var(--space-600) 0;
  }

  .s-nhip.p-name .morse {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-400);
  }

  .s-nhip.p-name .mark .mark-live {
    width: 200px;
    height: 200px;
  }

  .s-nhip .teaser {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .s-nhip .primary a {
    padding: var(--space-075);
    font-size: var(--fs-small);
    line-height: var(--lh-small);
  }

  .s-nhip .primary a[aria-current='page']::before {
    display: none;
  }

  .s-nhip .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-400);
    padding-block: var(--space-600);
  }

  .s-nhip .teaser h3 {
    font-size: var(--fs-h3);
    line-height: var(--lh-h3);
  }
}

@media (max-width: 360px) {
  .s-nhip h1 .ln-0 {
    font-size: var(--fs-h1);
    line-height: var(--lh-h1);
  }

  .s-nhip h1 .ln-1 {
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
  }

  .s-nhip .bar-card {
    padding: var(--space-075) var(--space-100);
  }
}

/* Large screens: more air around the opening. */
@media (min-width: 1400px) {
  .s-nhip .hero {
    padding-top: var(--space-900);
  }

  .mark-live {
    width: 320px;
    height: 320px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes tab-dot {
    50% {
      opacity: 0.35;
    }
  }

  .s-nhip .primary a[aria-current='page']::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: var(--space-075);
    border-radius: 50%;
    background: var(--header-text);
    vertical-align: middle;
    animation: tab-dot 2.4s var(--ease) infinite;
  }
}

/* The mark on the page itself (not on the Navy band) uses the kit colours made for that ground: Navy tile on Fog, Fog tile on Night. */
.mark-live.on-page .mk-tile {
  fill: #2e4256;
}

.mark-live.on-page .mk-dot {
  fill: #f1f3f5;
}

.mark-live.on-page .mk-dash {
  fill: #9fb3c4;
}

@media (prefers-color-scheme: dark) {
  .mark-live.on-page .mk-tile {
    fill: #f1f3f5;
  }

  .mark-live.on-page .mk-dot {
    fill: #2e4256;
  }

  .mark-live.on-page .mk-dash {
    fill: #4d6781;
  }
}

@media (max-width: 640px) {
  .s-nhip .top .bar {
    padding-inline: var(--space-200);
  }
}

@media (min-width: 701px) and (max-width: 800px) {
  .s-nhip .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .s-nhip .foot-lang {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-200);
  }

  .s-nhip .foot-rich .to-top {
    margin-top: 0;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .s-nhip .primary a[aria-current='page']::before {
    display: none;
  }
}

/* ================= v3: one full screen per tab, language pill, Saduo ID ================= */

.s-nhip {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.s-nhip main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.s-nhip .top {
  padding-top: var(--space-100);
}

/* The opening and the split pages fill the screen between the header and the footer. */
.s-nhip .hero {
  display: flex;
  align-items: center;
  padding: var(--space-500) 0;
}

.s-nhip.p-home .hero,
.s-nhip .page-split {
  flex: 1;
}

.s-nhip .hero > .wrap {
  width: 100%;
}

/* Two sentences, one level: same size, one on each line, each kept whole. */
.s-nhip h1 {
  text-wrap: balance;
}

.s-nhip h1 .ln-0,
.s-nhip h1 .ln-1 {
  text-wrap: balance;
}

.s-nhip .page-hero {
  padding: var(--space-400) 0;
}

.s-nhip .page-hero h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}

.s-nhip .page-split .hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-700);
  align-items: center;
}

.s-nhip .page-split .hero-art {
  justify-self: center;
}

.s-nhip .page-split .legend-title {
  margin: var(--space-300) 0 var(--space-100);
  color: var(--header-muted);
}

.s-nhip .page-split .legend {
  gap: var(--space-075);
}

.s-nhip .page-split .letter {
  color: var(--header-text);
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  width: var(--space-300);
}

.s-nhip .page-split .legend .m-dot {
  width: var(--space-200);
  height: var(--space-200);
  border-radius: var(--space-075);
  background: var(--header-text);
}

.s-nhip .page-split .legend .m-dash {
  width: calc(var(--space-200) * 3);
  height: var(--space-200);
  border-radius: var(--space-075);
  background: var(--header-muted);
}

.s-nhip .page-split .legend .signal {
  gap: var(--space-075);
}

/* Questions on the Navy ground */
.s-nhip .page-split .faq {
  max-width: none;
  border-top-color: var(--header-border);
}

.s-nhip .page-split details {
  border-bottom-color: var(--header-border);
}

.s-nhip .page-split summary {
  color: var(--header-text);
  padding-block: var(--space-200);
}

.s-nhip .page-split details p {
  color: var(--header-text);
}

/* Apps tab: the heading is short, the two products take the rest */
.s-nhip.p-apps .section {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-400) 0;
}

.s-nhip.p-apps .section > .wrap {
  width: 100%;
}

.s-nhip .app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    'art kind'
    'art name'
    'art text'
    'art link';
  align-content: center;
  align-items: start;
  column-gap: var(--space-400);
  row-gap: var(--space-075);
  min-height: 0;
  padding: var(--space-400);
}

.s-nhip .app-art {
  grid-area: art;
  width: 120px;
  margin: 0;
  align-self: center;
}

.s-nhip .app-kind {
  grid-area: kind;
}

.s-nhip .app-name {
  grid-area: name;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

.s-nhip .app-text {
  grid-area: text;
  flex: none;
}

.s-nhip .app-link {
  grid-area: link;
  justify-self: start;
  margin-top: var(--space-100);
}

/* Header: language as a pill, Saduo ID as the corner button */
.s-nhip .bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-200);
  margin-left: auto;
}

.s-nhip .primary {
  margin-right: var(--space-100);
}

.s-nhip .top .lang {
  gap: 0;
  padding: 3px;
  border: 1px solid var(--lang-on-text);
  border-radius: 999px;
}

.s-nhip .top .lang a,
.s-nhip .top .lang strong {
  display: inline-block;
  min-width: var(--space-500);
  padding: var(--space-050) var(--space-100);
  border-radius: 999px;
  text-align: center;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    background-color var(--dur-color) var(--ease),
    color var(--dur-color) var(--ease);
}

.s-nhip .top .lang a {
  color: var(--lang-on-text);
}

.s-nhip .top .lang a:hover {
  background: var(--header-muted);
}

.s-nhip .top .lang strong {
  background: var(--lang-on-text);
  color: var(--header-text);
  padding: var(--space-050) var(--space-100);
}

.id-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-075);
  padding: var(--space-075) var(--space-200);
  border-radius: 999px;
  background: var(--lang-on-text);
  color: var(--header-text);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--dur-color) var(--ease),
    background-color var(--dur-color) var(--ease);
}

.id-link:hover {
  background: var(--primary-hover);
  color: var(--primary-text);
  transform: translateY(-1px);
}

/* The arrow is drawn: a short line and a corner. */
.id-go {
  position: relative;
  width: var(--space-200);
  height: var(--space-200);
  transition: transform var(--dur-move) var(--ease);
}

.id-go::before {
  content: '';
  position: absolute;
  left: 1px;
  right: 2px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  border-radius: 1px;
}

.id-go::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 50%;
  width: var(--space-075);
  height: var(--space-075);
  margin-top: -4px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.id-link:hover .id-go {
  transform: translateX(var(--space-050));
}

.s-nhip .bar-card a:focus-visible {
  outline-color: var(--lang-on-text);
}

/* Slim footer */
.s-nhip .foot-slim {
  margin-top: 0;
  background: var(--header-bg);
  color: var(--header-text);
  border-top: 0;
  overflow: hidden;
}

.s-nhip .foot-slim .foot-ticker {
  margin: 0;
  padding: var(--space-100) 0;
  border-top: 0;
  border-bottom: 1px solid var(--header-border);
}

.s-nhip .foot-slim .bar {
  padding-block: var(--space-200);
}

.s-nhip .foot-slim p {
  color: var(--header-muted);
}

.s-nhip .foot-slim .legal a {
  color: var(--header-text);
}

.s-nhip .foot-slim a:focus-visible {
  outline-color: var(--header-text);
}

@media (max-width: 1000px) {
  .s-nhip .page-split .hero-grid {
    gap: var(--space-500);
  }
}

@media (max-width: 800px) {
  .s-nhip .bar-right {
    display: contents;
  }

  .s-nhip .bar-card .lang {
    order: 2;
    margin-left: auto;
  }

  .s-nhip .bar-card .id-link {
    order: 3;
    padding: var(--space-050) var(--space-200);
  }

  .s-nhip .bar-card .primary {
    order: 4;
    margin-right: 0;
  }

  .s-nhip .hero {
    padding: var(--space-400) 0;
  }

  .s-nhip .page-split .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .s-nhip .page-split .hero-art {
    order: -1;
  }

  .s-nhip .page-split .mark-live {
    width: 120px;
    height: 120px;
  }

  .s-nhip .app {
    padding: var(--space-300);
    column-gap: var(--space-300);
  }

  .s-nhip .app-art {
    width: 72px;
  }

  .s-nhip .app-name {
    font-size: var(--fs-h3);
    line-height: var(--lh-h3);
  }

  .s-nhip .app-text {
    font-size: var(--fs-small);
    line-height: var(--lh-small);
  }
}

@media (max-width: 380px) {
  .id-go {
    display: none;
  }
}

/* Short screens (small laptops) and phones: tighten so each tab still fits without scrolling. */
@media (max-height: 700px) {
  .s-nhip .page-hero {
    padding: var(--space-200) 0;
  }

  .s-nhip.p-apps .section {
    padding: var(--space-200) 0;
  }

  .s-nhip .app {
    padding: var(--space-300);
  }
}

@media (max-width: 640px) {
  .s-nhip.p-apps .page-hero .lead,
  .s-nhip .app-kind {
    display: none;
  }

  .s-nhip .page-hero {
    padding: var(--space-200) 0;
  }

  .s-nhip.p-apps .section {
    padding: var(--space-200) 0;
  }

  .s-nhip .app {
    padding: var(--space-200);
    column-gap: var(--space-200);
  }

  .s-nhip .app-art {
    width: 56px;
  }

  .s-nhip .page-split .hero-art {
    display: none;
  }

  .s-nhip .page-split .legend-title {
    margin-top: var(--space-200);
  }
}

@media (max-width: 800px) and (max-height: 780px) {
  .s-nhip .mark-live {
    width: 112px;
    height: 112px;
  }

  .net {
    width: 240px;
    height: 240px;
    margin: -120px 0 0 -120px;
  }

  .s-nhip .hero {
    padding: var(--space-200) 0;
  }

  .s-nhip .hero-grid {
    gap: var(--space-300);
  }
}

@media (max-width: 640px) {
  .s-nhip .page-hero h1 {
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
  }
}

/* ================= v4: more life ================= */

.s-nhip .hero {
  position: relative;
}

.s-nhip .hero > .wrap {
  position: relative;
  z-index: 1;
}

.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The headline: words slide up out of their line, one after the other. */
.s-nhip h1 .ln-0,
.s-nhip h1 .ln-1 {
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.s-nhip h1 .w {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes word-in {
    from {
      opacity: 0;
      transform: translateY(110%);
    }
  }

  .s-nhip h1 .w {
    animation: word-in 900ms var(--ease) both;
  }

  .s-nhip h1 .ln-0 .w:nth-child(1) { animation-delay: 150ms; }
  .s-nhip h1 .ln-0 .w:nth-child(2) { animation-delay: 260ms; }
  .s-nhip h1 .ln-0 .w:nth-child(3) { animation-delay: 370ms; }
  .s-nhip h1 .ln-1 .w:nth-child(1) { animation-delay: 560ms; }
  .s-nhip h1 .ln-1 .w:nth-child(2) { animation-delay: 670ms; }
  .s-nhip h1 .ln-1 .w:nth-child(3) { animation-delay: 780ms; }
  .s-nhip h1 .ln-1 .w:nth-child(4) { animation-delay: 890ms; }

  /* Each page eases in. It is the page's own animation, not a view transition: a transition freezes
     the document under a snapshot for about half a second, and a click on the next tab during that
     time was lost. Nothing here covers the page, so every click counts at once. */
  @keyframes page-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  body.s-nhip > main {
    animation: page-in 420ms var(--ease) both;
  }
}

.s-nhip .app {
  transition: transform 220ms var(--ease);
}

/* v5: the Morse drawn finely, and the About page (name on the left, questions on the right). */

/* One unit: a dot is a small round, a dash is three of them with the same round ends. */
.s-nhip .m-dot,
.s-nhip .m-dash {
  height: 6px;
  border-radius: 3px;
}

.s-nhip .m-dot {
  width: 6px;
}

.s-nhip .m-dash {
  width: 18px;
}

/* The moving line: thin, quiet, with room between letters so the name reads as five groups. */
.s-nhip .tk-letter {
  gap: 6px;
  margin-right: 44px;
}

.s-nhip .ticker .m-dot,
.s-nhip .ticker .m-dash {
  background: var(--header-muted);
  opacity: 0.55;
}

.s-nhip .foot-slim .foot-ticker {
  padding: var(--space-075) 0;
}

/* The legend: the letter small and quiet, the signs in the same size as the ticker. */
.s-nhip .legend,
.s-nhip .page-split .legend {
  gap: 10px;
}

.s-nhip .letter,
.s-nhip .page-split .letter {
  width: 20px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-medium);
  color: var(--header-muted);
}

.s-nhip .legend .m-dot,
.s-nhip .page-split .legend .m-dot,
.s-nhip .legend .m-dash,
.s-nhip .page-split .legend .m-dash {
  height: 6px;
  border-radius: 3px;
}

.s-nhip .legend .m-dot,
.s-nhip .page-split .legend .m-dot {
  width: 6px;
  background: var(--header-text);
}

.s-nhip .legend .m-dash,
.s-nhip .page-split .legend .m-dash {
  width: 18px;
  background: var(--header-text);
}

.s-nhip .legend .signal,
.s-nhip .page-split .legend .signal {
  gap: 6px;
}

/* About page */
.s-nhip .page-split .hero-grid {
  align-items: center;
}

.s-nhip .name-block {
  display: flex;
  align-items: center;
  gap: var(--space-300);
  margin-top: var(--space-400);
  padding-top: var(--space-300);
  border-top: 1px solid var(--header-border);
}

.s-nhip .name-mark {
  flex: none;
  width: 112px;
  height: 112px;
}

.s-nhip .name-block .morse-text {
  min-width: 0;
}

.s-nhip .name-block .legend-title {
  margin: 0 0 var(--space-100);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-medium);
  color: var(--header-text);
}

.s-nhip .about-faq {
  min-width: 0;
}

.s-nhip .faq-title {
  margin: 0 0 var(--space-150, var(--space-100));
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: var(--fw-medium);
  color: var(--header-muted);
}

@media (max-width: 800px) {
  .s-nhip .page-split .hero-art {
    display: none;
  }

  .s-nhip .name-block {
    margin-top: var(--space-300);
    padding-top: var(--space-200);
    gap: var(--space-200);
  }

  .s-nhip .name-mark {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 560px) {
  .s-nhip .name-block {
    margin-top: var(--space-200);
    padding-top: var(--space-150, var(--space-100));
    gap: var(--space-200);
  }

  .s-nhip .name-block .legend-title {
    display: none;
  }

  .s-nhip .name-mark {
    width: 72px;
    height: 72px;
  }

  .s-nhip .page-split .legend {
    gap: 6px;
  }

  .s-nhip .page-split summary {
    padding-block: var(--space-100);
  }

  .s-nhip .page-split .hero-grid {
    gap: var(--space-200);
  }

  .s-nhip .faq-title {
    margin-bottom: var(--space-050);
  }
}

/* v6: phones. A compact top card (logo, language, Saduo ID) and the three tabs as a bar at the
   bottom of the screen, where a thumb reaches. Sizes are in rem so they follow the text size the
   person chose; the layout wraps instead of clipping when the text is large. */
@media (max-width: 720px) {
  body.s-nhip .top {
    padding-top: 0.75rem;
  }

  body.s-nhip .bar-card {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 0.625rem 0.5rem 0.875rem;
    border-radius: 1.25rem;
  }

  body.s-nhip .bar-card .logo {
    margin-right: auto;
  }

  body.s-nhip .bar-card .logo img {
    display: block;
    width: auto;
    height: 2rem;
  }

  body.s-nhip .blink {
    display: none;
  }

  body.s-nhip .bar-right {
    display: contents;
  }

  body.s-nhip .bar-card .lang {
    margin: 0;
  }

  body.s-nhip .bar-card .id-link {
    margin: 0;
    padding: 0.4375rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.25;
  }

  body.s-nhip .bar-card .id-go {
    width: 1rem;
    height: 1rem;
  }

  /* Tabs: a bar fixed to the bottom, three equal parts. */
  body.s-nhip .primary {
    position: fixed;
    z-index: 30;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    margin: 0;
    padding: 0.3125rem;
    background: var(--header-text);
    border: 1px solid var(--header-muted);
    border-radius: 1.25rem;
  }

  body.s-nhip .primary a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.375rem 0.25rem;
    border-radius: 0.9375rem;
    font-size: 0.9375rem;
    line-height: 1.2;
    text-align: center;
  }

  body.s-nhip .foot-slim {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* Opening */
  body.s-nhip .hero {
    padding: 1.5rem 0 2rem;
  }

  body.s-nhip .hero-grid {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.25rem;
  }

  body.s-nhip .hero-art {
    justify-self: auto;
  }

  body.s-nhip .hero-art .mark-live {
    width: 4.5rem;
    height: 4.5rem;
  }

  body.s-nhip .hero-copy .lead {
    font-size: 1.0625rem;
    line-height: 1.5;
  }

  body.s-nhip .hero-copy .cta {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    text-align: center;
  }

  body.s-nhip h1 {
    overflow-wrap: anywhere;
  }

  /* Inner pages */
  body.s-nhip .page-hero {
    padding: 1.25rem 0 1.5rem;
  }

  body.s-nhip .page-split .hero-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  body.s-nhip .page-split .hero-art {
    display: none;
  }

  body.s-nhip .page-split summary {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding-block: 0.5rem;
  }

  body.s-nhip .name-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    gap: 1rem;
  }

  body.s-nhip .name-mark {
    width: 4.5rem;
    height: 4.5rem;
  }

  body.s-nhip .name-block .legend-title {
    display: block;
    font-size: 0.9375rem;
  }

  body.s-nhip .apps {
    gap: 0.75rem;
  }

  body.s-nhip .section {
    padding-block: 1.25rem 1.5rem;
  }
}

@media (max-width: 720px) {
  body.s-nhip .hero-grid {
    flex-direction: column;
  }

  body.s-nhip .hero-art {
    order: -1;
  }
}

/* On phones the opening is as tall as the smallest visible screen, so it does not resize while the address bar slides away. */
@media (max-width: 720px) {
  body.s-nhip .hero,
  body.s-nhip main {
    min-height: 0;
  }

  @supports (height: 100svh) {
    body.s-nhip {
      min-height: 100svh;
    }
  }
}

/* ================= v7: light and dark look, the toggle, the loading screen, About ================= */

/* Light look: a Fog opening with Navy ink, and a Navy card for the header. It is also the look with
   no script on a light device. */
body.s-nhip {
  --header-bg: #f1f3f5;
  --header-text: #2e4256;
  --header-muted: #4d6781;
  --header-border: #9fb3c4;
  --lang-on-bg: #d3dae1;
  --lang-on-text: #f1f3f5;
  --mk-tile: #2e4256;
  --mk-dot: #f1f3f5;
  --mk-dash: #9fb3c4;
  --logo-on-fog: none;
  --logo-on-navy: block;
}

/* Dark look: chosen with the button, or the device is dark and nothing was chosen. */
:root[data-theme='dark'] body.s-nhip {
  --header-bg: #131b23;
  --header-text: #f1f3f5;
  --header-muted: #9fb3c4;
  --header-border: #4d6781;
  --lang-on-bg: #9fb3c4;
  --lang-on-text: #131b23;
  --mk-tile: #f1f3f5;
  --mk-dot: #2e4256;
  --mk-dash: #4d6781;
  --logo-on-fog: block;
  --logo-on-navy: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) body.s-nhip {
    --header-bg: #131b23;
    --header-text: #f1f3f5;
    --header-muted: #9fb3c4;
    --header-border: #4d6781;
    --lang-on-bg: #9fb3c4;
    --lang-on-text: #131b23;
    --mk-tile: #f1f3f5;
    --mk-dot: #2e4256;
    --mk-dash: #4d6781;
    --logo-on-fog: block;
    --logo-on-navy: none;
  }
}

body.s-nhip .logo-on-fog {
  display: var(--logo-on-fog);
}

body.s-nhip .logo-on-navy {
  display: var(--logo-on-navy);
}

body.s-nhip .mark-live .mk-tile {
  fill: var(--mk-tile);
}

body.s-nhip .mark-live .mk-dot {
  fill: var(--mk-dot);
}

body.s-nhip .mark-live .mk-dash {
  fill: var(--mk-dash);
}

/* Look button: a ring with one half filled; it turns over when the look changes. */
.theme-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--lang-on-text);
  border-radius: 999px;
  background: transparent;
  color: var(--lang-on-text);
  cursor: pointer;
  transition: background-color var(--dur-color) var(--ease);
}

.theme-ready .theme-toggle {
  display: inline-flex;
}

.theme-toggle:hover {
  background: var(--header-muted);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--lang-on-text);
  outline-offset: 2px;
}

.tt-icon {
  position: relative;
  display: block;
  width: 1.0625rem;
  height: 1.0625rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  overflow: hidden;
  transition: transform var(--dur-move) var(--ease);
}

.tt-icon::after {
  content: '';
  position: absolute;
  inset: 0 50% 0 0;
  background: currentColor;
}

:root[data-theme='dark'] .tt-icon {
  transform: rotate(180deg);
}

/* About: how Saduo works */
.s-nhip .principles {
  margin-top: var(--space-400);
  padding-top: var(--space-300);
  border-top: 1px solid var(--header-border);
}

.s-nhip .principles .legend-title {
  margin: 0 0 var(--space-150, var(--space-100));
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-medium);
  color: var(--header-muted);
}

.s-nhip .principles ul {
  display: grid;
  gap: var(--space-200);
  margin: 0;
  padding: 0;
  list-style: none;
}

.s-nhip .principles li {
  position: relative;
  padding-left: 1.25rem;
}

.s-nhip .principles li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--header-text);
}

.s-nhip .principles h3 {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-semibold);
  color: var(--header-text);
}

.s-nhip .principles p {
  margin: 0.125rem 0 0;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--header-muted);
}

/* Loading screen: hidden unless theme.js marked this visit (class splash) and motion is allowed. */
.splash-screen {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  html.splash .splash-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: var(--header-bg);
    pointer-events: none;
    animation: splash-out 450ms var(--ease) 1250ms forwards;
  }

  .splash-screen svg {
    display: block;
    width: min(42vmin, 11rem);
    height: auto;
  }

  .sp-tile {
    fill: var(--mk-tile);
  }

  .sp-dot {
    fill: var(--mk-dot);
  }

  .sp-dash {
    fill: var(--mk-dash);
  }

  .sp-tile,
  .sp-dot,
  .sp-dash {
    transform-box: fill-box;
  }

  .sp-tile {
    transform-origin: center;
    animation: sp-tile 420ms var(--ease) both;
  }

  .sp-dot {
    transform-origin: center;
    opacity: 0;
    animation: sp-pop 360ms var(--ease) forwards;
  }

  .sp-dash {
    transform-origin: left center;
    opacity: 0;
    animation: sp-grow 420ms var(--ease) forwards;
  }

  .sp-r0 * { animation-delay: 250ms; }
  .sp-r1 * { animation-delay: 380ms; }
  .sp-r2 * { animation-delay: 510ms; }
  .sp-r3 * { animation-delay: 640ms; }
  .sp-r4 * { animation-delay: 770ms; }

  .sp-bar {
    display: block;
    width: 7rem;
    height: 6px;
    border-radius: 3px;
    background: var(--header-border);
    overflow: hidden;
  }

  .sp-bar i {
    display: block;
    height: 100%;
    background: var(--header-text);
    transform-origin: left center;
    animation: sp-fill 1100ms var(--ease) 100ms both;
  }

  /* The page itself comes in as the screen leaves. */
  html.splash body > :not(.splash-screen):not(.leaving) {
    animation: page-soft 500ms var(--ease) 1250ms backwards;
  }

  @keyframes sp-tile {
    from { opacity: 0; transform: scale(0.86); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes sp-pop {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes sp-grow {
    from { opacity: 0; transform: scaleX(0); }
    to { opacity: 1; transform: scaleX(1); }
  }

  @keyframes sp-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }

  @keyframes splash-out {
    to { opacity: 0; }
  }

  @keyframes page-soft {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 720px) {
  body.s-nhip .theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }

  body.s-nhip .principles {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }

  body.s-nhip .principles ul {
    gap: 0.875rem;
  }
}

/* Product panels keep their own colours in both looks: Navy and Mist. */
body.s-nhip {
  --panel-a-bg: #2e4256;
  --panel-a-fg: #f1f3f5;
  --panel-b-bg: #9fb3c4;
  --panel-b-fg: #2e4256;
}

:root[data-theme='dark'] body.s-nhip {
  --panel-a-bg: #0d141a;
  --panel-b-fg: #131b23;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) body.s-nhip {
    --panel-a-bg: #0d141a;
    --panel-b-fg: #131b23;
  }
}

body.s-nhip .app-evez {
  background: var(--panel-a-bg);
  color: var(--panel-a-fg);
}

body.s-nhip .app-dotx {
  background: var(--panel-b-bg);
  color: var(--panel-b-fg);
}

body.s-nhip .app-evez .app-link:hover {
  background: var(--panel-a-fg);
  color: var(--panel-a-bg);
}

body.s-nhip .app-dotx .app-link:hover {
  background: var(--panel-b-fg);
  color: var(--panel-b-bg);
}

body.s-nhip.p-apps .page-hero {
  padding-top: var(--space-500);
}

/* Phones: show the one lockup that reads on the card (the earlier phone rule set display on every image), and keep the header, which holds the fixed tab bar, above the page. */
@media (max-width: 720px) {
  body.s-nhip .bar-card .logo .logo-on-fog {
    display: var(--logo-on-fog);
  }

  body.s-nhip .bar-card .logo .logo-on-navy {
    display: var(--logo-on-navy);
  }

  body.s-nhip .top {
    position: relative;
    z-index: 30;
  }
}

/* Phone header: row one is the logo with the look button and the language, row two is the Saduo ID button across the card. */
@media (max-width: 720px) {
  body.s-nhip .bar-card .logo {
    order: 1;
  }

  body.s-nhip .bar-card .theme-toggle {
    order: 2;
  }

  body.s-nhip .bar-card .lang {
    order: 3;
  }

  body.s-nhip .bar-card .id-link {
    order: 4;
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ================= v8: contact, terms versions, the question about measuring visits ================= */

[data-email-box][hidden],
.consent[hidden],
.consent-open[hidden] {
  display: none;
}

.s-nhip .principles .contact-row {
  margin: var(--space-300) 0 0;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--header-muted);
}

.s-nhip .principles .contact-row a,
.s-nhip .foot-slim .contact-link {
  color: var(--header-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.s-nhip .foot-slim .legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.consent-open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--header-muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.consent-open:focus-visible {
  outline: 3px solid var(--header-text);
  outline-offset: 2px;
}

/* One small card in the corner: it does not cover the page and does not return once answered. */
.consent {
  position: fixed;
  z-index: 60;
  left: 1rem;
  bottom: 1rem;
  width: min(22rem, calc(100vw - 2rem));
  padding: 1rem 1.125rem;
  border-radius: var(--radius-lg);
  background: var(--header-text);
  color: var(--lang-on-text);
}

.consent p {
  margin: 0;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.consent .consent-title {
  margin-bottom: 0.25rem;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.consent button {
  min-height: 2.5rem;
  padding: 0.375rem 1.125rem;
  border: 1px solid var(--lang-on-text);
  border-radius: 999px;
  font: inherit;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.consent-accept {
  background: var(--lang-on-text);
  color: var(--header-text);
}

.consent-decline {
  background: transparent;
  color: var(--lang-on-text);
}

.consent button:focus-visible {
  outline: 3px solid var(--lang-on-text);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) {
    animation: consent-in 450ms var(--ease) both;
  }

  @keyframes consent-in {
    from { opacity: 0; transform: translateY(0.75rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 720px) {
  .consent {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
}

/* ================= v9: four products on the Products tab ================= */

/* The colour of a panel comes from its tone, so a new product needs no new rule. */
body.s-nhip .tone-a {
  background: var(--panel-a-bg);
  color: var(--panel-a-fg);
}

body.s-nhip .tone-b {
  background: var(--panel-b-bg);
  color: var(--panel-b-fg);
}

body.s-nhip .tone-a .app-link:hover {
  background: var(--panel-a-fg);
  color: var(--panel-a-bg);
}

body.s-nhip .tone-b .app-link:hover {
  background: var(--panel-b-fg);
  color: var(--panel-b-bg);
}

/* Two by two: smaller panels so the whole tab still fits one screen. */
@media (min-width: 721px) {
  body.s-nhip.p-apps .apps {
    gap: var(--space-200);
  }

  body.s-nhip.p-apps .app {
    padding: var(--space-300);
    column-gap: var(--space-300);
    row-gap: var(--space-050);
  }

  body.s-nhip.p-apps .app-art {
    width: 84px;
  }

  body.s-nhip.p-apps .app-name {
    font-size: var(--fs-h3);
    line-height: var(--lh-h3);
  }

  body.s-nhip.p-apps .app-text {
    font-size: var(--fs-small);
    line-height: var(--lh-small);
  }

  body.s-nhip.p-apps .app-link {
    margin-top: var(--space-075);
    padding: var(--space-050) var(--space-200);
    font-size: var(--fs-small);
    line-height: var(--lh-small);
  }

  body.s-nhip.p-apps .section {
    padding: var(--space-200) 0;
  }
}

@media (min-width: 721px) {
  body.s-nhip.p-apps .app-name {
    font-size: var(--fs-title);
    line-height: var(--lh-title);
  }

  body.s-nhip.p-apps .page-hero {
    padding-top: var(--space-300);
    padding-bottom: var(--space-100);
  }

  body.s-nhip.p-apps .page-hero h1 {
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
  }
}

/* On a short screen the list of products matters more than the sentence above it. */
@media (min-width: 721px) and (max-height: 820px) {
  body.s-nhip.p-apps .page-hero .lead {
    display: none;
  }
}

/* Products in sections: web app, game, extensions. A section with several products spans both columns. */
body.s-nhip .groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-200) var(--space-200);
  align-items: start;
}

body.s-nhip .group {
  min-width: 0;
}

body.s-nhip .group-wide {
  grid-column: 1 / -1;
}

body.s-nhip .group-title {
  margin: 0 0 var(--space-075);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--header-muted);
}

body.s-nhip .group .apps {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-200);
}

body.s-nhip .group-wide .apps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* The section title already says what kind of product it is. */
body.s-nhip.p-apps .app-kind {
  display: none;
}

@media (max-width: 720px) {
  body.s-nhip .groups {
    grid-template-columns: minmax(0, 1fr);
  }

  body.s-nhip .group-wide .apps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 721px) and (max-height: 720px) {
  body.s-nhip.p-apps .app {
    padding: var(--space-200) var(--space-300);
  }

  body.s-nhip.p-apps .groups {
    gap: var(--space-100) var(--space-200);
  }

  body.s-nhip.p-apps .group .apps {
    gap: var(--space-200);
  }
}

/* The old rule for the heading of the products section would make these big. */
body.s-nhip #ung-dung h2.group-title {
  margin: 0 0 var(--space-075);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--header-muted);
}

/* One column (a phone): the colours alternate down the page, whatever the two-column tone was. */
@media (max-width: 720px) {
  body.s-nhip .app.pos-even {
    background: var(--panel-a-bg);
    color: var(--panel-a-fg);
  }

  body.s-nhip .app.pos-odd {
    background: var(--panel-b-bg);
    color: var(--panel-b-fg);
  }

  body.s-nhip .app.pos-even .app-link:hover {
    background: var(--panel-a-fg);
    color: var(--panel-a-bg);
  }

  body.s-nhip .app.pos-odd .app-link:hover {
    background: var(--panel-b-fg);
    color: var(--panel-b-bg);
  }

  /* Shorter cards: less padding, a smaller picture, a slimmer button. */
  body.s-nhip.p-apps .app {
    padding: var(--space-150, var(--space-100)) var(--space-200);
    column-gap: var(--space-200);
    row-gap: 0;
  }

  body.s-nhip.p-apps .app-art {
    width: 44px;
  }

  body.s-nhip.p-apps .app-name {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
  }

  body.s-nhip.p-apps .app-text {
    font-size: var(--fs-small);
    line-height: var(--lh-small);
  }

  body.s-nhip.p-apps .app-link {
    margin-top: var(--space-075);
    padding: var(--space-050) var(--space-150, var(--space-100));
    font-size: var(--fs-small);
    line-height: var(--lh-small);
  }

  body.s-nhip.p-apps .apps,
  body.s-nhip.p-apps .group .apps {
    gap: var(--space-100);
  }

  body.s-nhip.p-apps .groups {
    gap: var(--space-150, var(--space-100));
  }
}

/* v10: frosted panes. A soft, blurred card over the Morse network, so the lines and dots show through
   without taking the text. The same pane holds the products, and the two halves of the About page. */
body.s-nhip .glass {
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-300);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  backdrop-filter: blur(16px) saturate(1.05);
}

/* The network spans the heading and the products, and the content sits above it. */
body.s-nhip .field-zone {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  flex-direction: column;
}

body.s-nhip .field-zone > .field {
  z-index: 0;
}

body.s-nhip .field-zone > .hero,
body.s-nhip .field-zone > .section {
  position: relative;
  z-index: 1;
}

body.s-nhip .glass.groups {
  gap: var(--space-250, 1.25rem) var(--space-200);
}

/* About: two panes side by side; the text keeps its own colours inside them. */
body.s-nhip .page-split .principles.glass,
body.s-nhip .page-split .about-faq.glass {
  align-self: center;
}

body.s-nhip .page-split .principles.glass .legend-title,
body.s-nhip .page-split .about-faq.glass .faq-title {
  margin-top: 0;
}

@media (max-width: 720px) {
  body.s-nhip .glass {
    padding: var(--space-200);
    border-radius: var(--radius-md);
  }
}

body.s-nhip .field-zone > .hero {
  background: transparent;
}

/* Every product card is as tall as the tallest one, whatever the length of its text. */
@media (min-width: 721px) {
  body.s-nhip.p-apps .group .app {
    min-height: 10.5rem;
    align-content: center;
  }
}

/* About, wide screens: the Answers pane runs from the top of the heading to the bottom of the left pane. */
@media (min-width: 801px) {
  body.s-nhip .page-split .hero-grid {
    align-items: stretch;
  }

  body.s-nhip .page-split .hero-copy {
    display: flex;
    flex-direction: column;
  }

  body.s-nhip .page-split .about-faq.glass {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* The heading box starts a little above its letters: the pane starts at the letters. */
    margin-top: 0.35rem;
  }
}

/* ---- an app on its own page ---- */
.s-nhip .app-name a {
  color: inherit;
  text-decoration: none;
}

.s-nhip .app-name a:hover,
.s-nhip .app-name a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.s-nhip .app-page .app-art-big {
  width: min(100%, 22rem);
  justify-self: center;
}

.s-nhip .app-page .app-art-big svg {
  display: block;
  width: 100%;
  height: auto;
}

.s-nhip .app-page .app-back {
  margin-top: var(--space-300);
}

.s-nhip .app-page .app-back a {
  color: inherit;
}

.s-nhip .app-page {
  padding: var(--space-600, 4rem) 0;
}

body.s-nhip .app-page .app-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-500);
  align-items: center;
  justify-content: space-between;
}

body.s-nhip .app-page .app-copy {
  flex: 1 1 20rem;
  min-width: 0;
}

body.s-nhip .app-page .app-art-big {
  flex: 0 1 20rem;
  margin: 0;
}

.s-nhip .app-page h1 {
  margin: var(--space-050) 0 var(--space-200);
}

.s-nhip .app-page .lead {
  margin: 0 0 var(--space-300);
}

@media (max-width: 760px) {
  body.s-nhip .app-page .app-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .s-nhip .app-page .app-art-big {
    max-width: 14rem;
  }
}

body.s-nhip .app-page .app-grid::before,
body.s-nhip .app-page .app-grid::after {
  display: none;
}

body.s-nhip .field-zone > .app-page {
  background: transparent;
}

/* ---- the products: one grid for all of them, so a new app or site just takes the next place ---- */
body.s-nhip .catalog-wrap {
  padding: var(--space-300);
}

body.s-nhip .catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
  gap: var(--space-200);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.s-nhip .catalog .app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-075);
  min-height: 0;
  padding: var(--space-300);
  border-radius: var(--radius-lg);
}

body.s-nhip .catalog .app.pos-even,
body.s-nhip .catalog .app.pos-odd {
  background: revert-layer;
}

body.s-nhip .catalog .app.tone-a {
  background: var(--panel-a-bg);
  color: var(--panel-a-fg);
}

body.s-nhip .catalog .app.tone-b {
  background: var(--panel-b-bg);
  color: var(--panel-b-fg);
}

body.s-nhip .catalog .app-art {
  width: 5.5rem;
  margin: 0 0 var(--space-150, 0.75rem);
}

body.s-nhip .catalog .app-name {
  margin: 0;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

body.s-nhip .catalog .app-text {
  margin: 0 0 var(--space-200);
}

/* The way to get it always sits at the foot of the card, whatever the length of the text. */
body.s-nhip .catalog .app-link {
  margin-top: auto;
}

@media (max-width: 720px) {
  body.s-nhip .catalog-wrap {
    padding: var(--space-150, 0.75rem);
  }
}

/* The picked photo in the Meowment art: the outline only, set here because the page allows no inline style. */
.chip rect.chip-pick {
  fill: none;
}

/* Touch screens: every link and button gets a target of at least 44 px without moving the layout much. */
@media (pointer: coarse) {
  body.s-nhip .bar-card .logo,
  body.s-nhip .bar-card .theme-toggle,
  body.s-nhip .bar-card .id-link,
  body.s-nhip .bar-right nav.lang a,
  body.s-nhip .app-link,
  body.s-nhip .legal a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  body.s-nhip .bar-card .logo {
    justify-content: flex-start;
  }
  body.s-nhip .bar-card .id-link {
    display: flex;
  }
  body.s-nhip .app-name a {
    display: inline-block;
    padding: 10px 0;
    margin: -10px 0;
  }
}

/* Products: group buttons and one grid of cards that all have the same size (the text is held to three lines). */
body.s-nhip .p-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-100);
  margin: 0 0 var(--space-300);
}

body.s-nhip .p-filter[hidden] {
  display: none;
}

body.s-nhip .p-chip {
  appearance: none;
  min-height: 44px;
  padding: 0 var(--space-300);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background-color var(--dur-color) var(--ease), color var(--dur-color) var(--ease), border-color var(--dur-color) var(--ease);
}

body.s-nhip .p-chip:hover {
  border-color: var(--heading);
}

body.s-nhip .p-chip[aria-pressed='true'] {
  background: var(--heading);
  border-color: var(--heading);
  color: var(--surface);
}

body.s-nhip .p-chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

body.s-nhip .pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-200);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.s-nhip .pcard {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-200);
  min-height: 9.5rem;
  padding: var(--space-200);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  transition: transform var(--dur-move) var(--ease), border-color var(--dur-color) var(--ease);
}

body.s-nhip .pcard[hidden] {
  display: none;
}

body.s-nhip .pcard:hover {
  transform: translateY(-3px);
  border-color: var(--heading);
}

body.s-nhip .pcard:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

body.s-nhip .pcard-art {
  flex: none;
  width: 76px;
  height: 76px;
  padding: 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--heading) 7%, transparent);
  color: var(--heading);
}

body.s-nhip .pcard-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

body.s-nhip .pcard-body {
  min-width: 0;
}

body.s-nhip .pcard-kind {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* An h2 for the outline of the page, drawn as small as a card title: the longer selector beats the size of a section heading. */
body.s-nhip .pcard .pcard-name {
  margin: 0;
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: var(--fw-semibold);
  color: var(--heading);
}

body.s-nhip .pcard-name a {
  color: inherit;
  text-decoration: none;
}

/* The whole card opens the product page. */
body.s-nhip .pcard-name a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
}

body.s-nhip .pcard-name a:focus-visible {
  outline-color: transparent;
}

body.s-nhip .pcard-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: var(--space-025) 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

@media (max-width: 480px) {
  body.s-nhip .pcard {
    min-height: 8.5rem;
  }

  body.s-nhip .pcard-art {
    width: 64px;
    height: 64px;
  }
}

/* A direct way to the product itself (the store or the app) on each card, above the link that covers the card. */
body.s-nhip .pcard-open {
  position: absolute;
  top: var(--space-100);
  right: var(--space-100);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color var(--dur-color) var(--ease), color var(--dur-color) var(--ease);
}

body.s-nhip .pcard-open:hover {
  background: color-mix(in srgb, var(--heading) 9%, transparent);
  color: var(--heading);
}

body.s-nhip .pcard-open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

body.s-nhip .pcard-body {
  padding-right: var(--space-300);
}

/* ---- product pages (the list and an app page): one network behind header, page and footer ---- */
body.s-nhip .page-field {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  flex-direction: column;
}

body.s-nhip .page-field > .field {
  z-index: 0;
}

body.s-nhip .page-field > header,
body.s-nhip .page-field > main,
body.s-nhip .page-field > footer {
  position: relative;
  z-index: 1;
}

/* The header and the foot let the network show through; only the bar itself is solid. */
body.s-nhip .page-field > header.top,
body.s-nhip .page-field > footer {
  background: transparent;
}

body.s-nhip .page-field > main {
  flex: 1;
}

/* ---- an app page: compact, so it fits a screen; the facts and the other products sit side by side ---- */
body.s-nhip .app-page {
  padding: var(--space-400) 0;
  background: transparent;
}

body.s-nhip .app-page .app-art-big {
  flex-basis: 15rem;
  width: min(100%, 15rem);
}

body.s-nhip .app-page .app-grid {
  gap: var(--space-300);
}

/* The pane under an app's opening sits close to it, and the other products fit in one row where there is room. */
body.s-nhip .app-more.section {
  padding: 0 0 var(--space-400);
}

@media (min-width: 900px) {
  body.s-nhip .app-page {
    padding: var(--space-300) 0;
  }
}

/* Dark: the menu bar is the same navy card as in the light look, on a page of the same deep navy. */
:root[data-theme='dark'] body.s-nhip .bar-card {
  --header-text: #2e4256;
  --header-muted: #9fb3c4;
  --header-border: #9fb3c4;
  --lang-on-bg: #d3dae1;
  --lang-on-text: #f1f3f5;
  --logo-on-fog: none;
  --logo-on-navy: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) body.s-nhip .bar-card {
    --header-text: #2e4256;
    --header-muted: #9fb3c4;
    --header-border: #9fb3c4;
    --lang-on-bg: #d3dae1;
    --lang-on-text: #f1f3f5;
    --logo-on-fog: none;
    --logo-on-navy: block;
  }
}

/* Dark: the chosen button is deep navy with light text, not a white pill. */
:root[data-theme='dark'] body.s-nhip .primary a[aria-current='page'],
:root[data-theme='dark'] body.s-nhip .primary a[aria-current='page']:hover,
:root[data-theme='dark'] body.s-nhip .top .lang strong,
:root[data-theme='dark'] body.s-nhip .id-link {
  background: #131b23;
  color: #f1f3f5;
}

:root[data-theme='dark'] body.s-nhip .primary a[aria-current='page']::before {
  background: #f1f3f5;
}

:root[data-theme='dark'] body.s-nhip .id-link:hover {
  background: #4d6781;
  color: #f1f3f5;
}

:root[data-theme='dark'] body.s-nhip .p-chip[aria-pressed='true'] {
  background: #2e4256;
  border-color: #4d6781;
  color: #f1f3f5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) body.s-nhip .primary a[aria-current='page'],
  :root:not([data-theme]) body.s-nhip .primary a[aria-current='page']:hover,
  :root:not([data-theme]) body.s-nhip .top .lang strong,
  :root:not([data-theme]) body.s-nhip .id-link {
    background: #131b23;
    color: #f1f3f5;
  }

  :root:not([data-theme]) body.s-nhip .primary a[aria-current='page']::before {
    background: #f1f3f5;
  }

  :root:not([data-theme]) body.s-nhip .id-link:hover {
    background: #4d6781;
    color: #f1f3f5;
  }

  :root:not([data-theme]) body.s-nhip .p-chip[aria-pressed='true'] {
    background: #2e4256;
    border-color: #4d6781;
    color: #f1f3f5;
  }
}

/* Touch screens: both halves of the language switch are the same height, so the chosen one sits in the middle of the pill. */
@media (pointer: coarse) {
  body.s-nhip .bar-right nav.lang a,
  body.s-nhip .bar-right nav.lang strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 44px;
  }
}

/* The header holds the fixed tab bar on phones, so it stays above the page that scrolls under it. */
body.s-nhip .page-field > header,
body.s-nhip .field-zone > header {
  position: relative;
  z-index: 2;
}

/* Phones: the top card is one short row (logo, theme, language, Saduo ID) that stays at the top while the page scrolls under it,
   so the language and the way to Saduo ID are never a long scroll away. The tabs stay in the bar at the bottom. */
@media (max-width: 720px) {
  body.s-nhip .page-field > header.top,
  body.s-nhip .field-zone > header.top,
  body.s-nhip .top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: transparent;
    padding-top: var(--space-100);
    padding-bottom: var(--space-100);
    pointer-events: none;
  }

  body.s-nhip .top .bar-card {
    pointer-events: auto;
    flex-wrap: nowrap;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem 0.375rem 0.75rem;
    border-radius: 1.25rem;
  }

  body.s-nhip .top .bar-card .logo img {
    height: 1.75rem;
  }

  body.s-nhip .top .bar-card .id-link {
    order: 4;
    flex: 0 0 auto;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  body.s-nhip .top .bar-card .id-go {
    display: none;
  }

  body.s-nhip .top .bar-card .theme-toggle {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 0;
    min-height: 0;
  }

  body.s-nhip .top .bar-card nav.lang a,
  body.s-nhip .top .bar-card nav.lang strong {
    min-width: 2.25rem;
    min-height: 2rem;
    padding-inline: 0.5rem;
  }
}

/* The picture on an app page is not inside a panel that motion.js watches, so it runs from the start; it was staying hidden and left a gap. */
.js .app-page .app-art * {
  animation-play-state: running;
}

/* The picture is drawn in the heading colour, which is readable on the page in both looks. */
body.s-nhip .app-page .app-art-big {
  color: var(--heading);
}
/* Running text stays plain left aligned: the browser fills each line. Only the big headings are balanced. */
body.s-nhip .page-hero h1,
body.s-nhip .app-page h1 {
  text-wrap: balance;
}

/* Phones: the big picture on an app page is left out, so there is no empty space between the button and the facts. */
@media (max-width: 760px) {
  body.s-nhip .app-page .app-art-big {
    display: none;
  }
}

/* Paragraphs are filled line by line. On some phone browsers the earlier pretty setting moved whole word groups to the next line and left the right side empty. */
body.s-nhip p,
body.s-nhip .lead,
body.s-nhip .app-text {
  text-wrap: wrap;
}

/* ---- an app page, product first: a bigger head, four tiles about the product, the others as one quiet line ---- */
body.s-nhip .app-page {
  padding: var(--space-500) 0 var(--space-400);
}

body.s-nhip .app-page .app-art-big {
  flex-basis: 20rem;
  width: min(100%, 20rem);
}

body.s-nhip .app-body {
  padding: 0 0 var(--space-500);
  background: transparent;
}

body.s-nhip .app-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--space-200);
  margin: 0;
  padding: 0;
}

body.s-nhip .app-tile {
  padding: var(--space-300);
}

body.s-nhip .app-tile dt {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

body.s-nhip .app-tile dd {
  margin: var(--space-050) 0 0;
  color: var(--heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: var(--fw-semibold);
}

body.s-nhip .app-tile dd a {
  color: inherit;
  text-underline-offset: 0.2em;
}

body.s-nhip .app-also {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-200);
  margin: var(--space-300) 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

body.s-nhip .app-also a {
  display: inline-block;
  padding: var(--space-075) 0;
  color: var(--heading);
  text-underline-offset: 0.2em;
}

body.s-nhip .app-also .app-all {
  margin-left: auto;
  font-weight: var(--fw-medium);
}

/* A link that leaves for another site and takes a while: the page steps back and the Saduo network gathers in the middle (busy.js). */
body.s-nhip .leaving {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  cursor: progress;
  animation: leaving-in 200ms var(--ease, ease) both;
}

body.s-nhip .leaving-core {
  display: grid;
  justify-items: center;
}

body.s-nhip .leaving-core canvas {
  display: block;
  width: 240px;
  height: 240px;
  max-width: 70vw;
  max-height: 70vw;
}

body.s-nhip .leaving-core p {
  margin: calc(var(--space-300) * -1) 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

body.s-nhip .leaving-core canvas[hidden] + p {
  margin: 0;
}

@keyframes leaving-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.s-nhip .leaving {
    animation: none;
  }
}

/* ---- the header controls share one height: the theme button, the language switch and the Saduo ID button ----
   They were 36, 32 and 40 px tall on a wide screen and 40, 40 and 44 on a phone. One variable now sets all three, a
   touch screen asks for the larger size. */
body.s-nhip .top .bar-card {
  --ctl: 40px;
}

@media (pointer: coarse) {
  body.s-nhip .top .bar-card {
    --ctl: 44px;
  }
}

body.s-nhip .top .bar-card .theme-toggle {
  box-sizing: border-box;
  width: var(--ctl);
  height: var(--ctl);
  min-width: var(--ctl);
  min-height: var(--ctl);
}

body.s-nhip .top .bar-card nav.lang {
  box-sizing: border-box;
  display: inline-flex;
  align-items: stretch;
  height: var(--ctl);
  padding: 3px;
}

body.s-nhip .top .bar-card nav.lang a,
body.s-nhip .top .bar-card nav.lang strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 0;
  min-width: 2.5rem;
  line-height: 1;
}

body.s-nhip .top .bar-card .id-link {
  box-sizing: border-box;
  height: var(--ctl);
  min-height: var(--ctl);
}
