/* NinjaDojo public site (load after base.css) */

/* Top bar */

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: 1rem var(--gutter);
}

.topbar-link {
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 0;
}
.topbar-link:hover {
  text-decoration: underline;
}

/* The app offer: one ruled line above the brand, on a phone that can install the app (pwa.js shows it). No box and
   no gold fill: the page's own gold button stays the one primary action. */

.topbar {
  flex-wrap: wrap;
}

.app-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  flex-basis: 100%;
  margin-top: -0.5rem;
  border-bottom: 1px solid var(--slate);
  color: var(--ink-dim);
  font-size: 0.9375rem;
}
.app-offer[hidden],
.app-offer [hidden] {
  display: none;
}
.app-offer p {
  flex: 1 1 13rem;
  padding: 0.5rem 0;
}
.app-offer strong {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.app-offer-later {
  margin-left: auto;
}

.app-offer button {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-dim);
  font: inherit;
  cursor: pointer;
  transition: color 0.2s var(--ease-out);
}
.app-offer-later:hover {
  color: var(--ink);
}
.app-offer .app-offer-install {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
.app-offer .app-offer-install:hover {
  text-decoration-thickness: 2px;
}

/* The ink art */

.ink {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
  overflow: visible;
}
.ink path,
.ink ellipse {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ink .brush {
  fill: currentColor;
  stroke: none;
}
.ink .ground {
  fill: var(--ground);
  stroke: none;
}
.ink .far {
  fill: var(--slate);
}
.ink .near {
  fill: var(--ink-dim);
}
.ink .ink-mid {
  stroke-width: 1.8;
}
.ink .ink-fine {
  stroke-width: 1.2;
}
.ink .ink-hair {
  stroke-width: 0.8;
}
.ink .stitch {
  stroke-dasharray: 5 4;
}

/* Title screen: the start screen of the game */

.title-screen {
  position: relative;
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 8vw, 5rem);
}

.ink-katana-scene {
  margin: 0 calc(var(--gutter) * -1) 0.5rem;
  width: calc(100% + var(--gutter) * 2);
  max-width: none;
}

.slash {
  transform-box: view-box;
  transform-origin: 46px 322px;
  animation: slash 0.9s var(--ease-out) 0.15s both;
}
.slash:nth-child(2) {
  animation-delay: 0.2s;
}
.slash:nth-child(3) {
  animation-delay: 0.25s;
}
.slash:nth-child(4) {
  animation-delay: 0.3s;
}
.slash:nth-child(5) {
  animation-delay: 0.35s;
}

@keyframes slash {
  from {
    opacity: 0;
    transform: rotate(16deg);
  }
  to {
    opacity: 1;
    transform: rotate(0);
  }
}

.gust {
  animation: gust 10s linear infinite;
}
.gust-1 {
  animation-duration: 12s;
}
.gust-2 {
  animation-duration: 8.5s;
}
.gust-3 {
  animation-duration: 14s;
}
.gust-far {
  animation-name: gust-far;
  animation-duration: 19s;
}

@keyframes gust {
  0% {
    transform: translate(-80px, 22px);
    opacity: 0;
  }
  20%,
  75% {
    opacity: 1;
  }
  100% {
    transform: translate(160px, -44px);
    opacity: 0;
  }
}

@keyframes gust-far {
  0% {
    transform: translate(-40px, 10px);
    opacity: 0;
  }
  20%,
  75% {
    opacity: 1;
  }
  100% {
    transform: translate(80px, -22px);
    opacity: 0;
  }
}

.title-block h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5.25rem);
  max-width: 11ch;
}

.lede {
  margin-top: 0.875rem;
  color: var(--ink-dim);
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  max-width: 30rem;
}

/* The menu: the gold brush is its cursor */

.menu {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 32rem;
}

.menu-item {
  padding: 0.375rem 0;
}

.menu-line {
  position: relative;
  display: inline-block;
  padding: 0.25rem 0 0.5rem;
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

a.menu-line,
label.menu-line {
  cursor: pointer;
}

.menu-line::after,
.level .menu-line > span::after {
  content: "";
  position: absolute;
  left: -0.25em;
  right: -0.5em;
  bottom: -0.1em;
  height: 0.5em;
  background: url("../img/brush.svg") no-repeat 0 0 / 100% 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
  pointer-events: none;
}

.menu-item.is-selected .menu-line,
.menu-item:hover .menu-line,
.menu-item:focus-within .menu-line {
  color: var(--ink);
}

.menu-item.is-selected .menu-line::after,
.menu-item:hover .menu-line::after,
.menu-item:has(:focus-visible) .menu-line::after {
  transform: scaleX(1);
}

/* the cursor leaves the selected line while another line has it */
.menu:has(.menu-item:not(.is-selected):hover) .is-selected .menu-line,
.menu:has(.menu-item:not(.is-selected) :focus-visible) .is-selected .menu-line {
  color: var(--ink-dim);
}
.menu:has(.menu-item:not(.is-selected):hover) .is-selected .menu-line::after,
.menu:has(.menu-item:not(.is-selected) :focus-visible) .is-selected .menu-line::after {
  transform: scaleX(0);
}

.menu-item a.menu-line:focus-visible {
  outline: none;
}

/* Search */

.search-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.search-field {
  flex: 1;
  min-width: 0;
  height: 3.25rem;
  padding: 0 0.875rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}
.search-field::placeholder {
  color: var(--ink-dim);
  opacity: 1;
}
.search-field:hover {
  border-color: var(--gold);
}
.search-field:focus-visible {
  border-color: var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 0;
}
.search-field::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--ground);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.button:hover {
  background: var(--gold-bright);
}
.button:active {
  transform: translateY(1px);
}
.button:focus-visible {
  outline-color: var(--ink);
}

/* Screens below the title */

.title-screen + .screen {
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.screen {
  padding: var(--screen-gap) var(--gutter) 0;
  max-width: 82rem;
  margin: 0 auto;
}

.screen-head {
  max-width: var(--measure);
}

.screen h2 {
  font-size: clamp(2.125rem, 1.5rem + 3vw, 4rem);
}

.screen-head p {
  margin-top: 1.25rem;
  color: var(--ink-dim);
}

.screen-head .button {
  margin-top: 2rem;
}

/* What this is: the two kinds of winning in full ink, then one sentence with the four promises */

.about .screen-head strong {
  font-weight: 500;
  color: var(--ink);
}

.manifesto {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  max-width: 24em;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.75rem);
  line-height: 1.3;
  color: var(--ink-dim);
}

.manifesto strong {
  font-weight: 800;
  color: var(--ink);
}

/* What you learn */

.learn-part {
  margin-top: clamp(3rem, 8vw, 5.5rem);
}

.learn-part h3 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
}

.learn-part > p {
  margin-top: 0.5rem;
  color: var(--ink-dim);
}

.skills {
  margin-top: 1.75rem;
}

.skills li {
  display: grid;
  grid-template-columns: clamp(5rem, 3.5rem + 4vw, 7.5rem) 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.75rem);
  line-height: 1.15;
}

.skills .ink {
  width: 100%;
}
.skills .ink .ink-fine {
  stroke-width: 1.4;
}

.armory {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem) 3rem;
  margin-top: 2rem;
}

.weapon figcaption {
  position: relative;
  margin-top: 1rem;
  padding-left: 2.75rem;
  color: var(--ink-dim);
}

/* call-out leader from the label up to the drawing */
.weapon figcaption::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: -0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-left: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.weapon figcaption strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
}

/* No strength needed: what the skills rely on in full ink, like the art of winning; the site has no italics, so the
   Japanese word stays upright and its sentence explains it */

.strength .screen-head strong {
  font-weight: 500;
  color: var(--ink);
}

.strength i {
  font-style: normal;
}

/* The path: stations in the menu's grammar */

.stations {
  position: relative;
  display: grid;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-left: 2rem;
}

.stations::before {
  content: "";
  position: absolute;
  left: 0.4375rem;
  top: 1rem;
  bottom: 1rem;
  border-left: 1px solid var(--slate);
}

.station {
  position: relative;
}

.station::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.9rem;
  width: 0.875rem;
  height: 0.875rem;
  border: 1px solid var(--ink-dim);
  border-radius: 50%;
  background: var(--ground);
}

.station.is-current::before {
  border-color: var(--gold);
  background: var(--gold);
}

.station.is-current .menu-line {
  color: var(--ink);
}

.station.is-current .menu-line::after,
.station.is-current .menu-line > span::after {
  transform: scaleX(1);
}

.station p {
  color: var(--ink-dim);
  max-width: 24rem;
}

.station em {
  font-style: normal;
  font-weight: 700;
  color: var(--gold);
}

.belt {
  margin-top: clamp(3rem, 8vw, 5rem);
  max-width: 44rem;
}

.belt figcaption {
  margin-top: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
}

/* on to the training page, after the belt */
.path-more {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 0;
  font-weight: 500;
  text-underline-offset: 0.3em;
}
.path-more:hover {
  text-decoration-thickness: 2px;
}

/* Instructor */

.instructor {
  position: relative;
}

.instructor-mark {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(6rem, 4rem + 10vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink-dim);
  margin-bottom: 1.5rem;
}

.instructor .screen-head p {
  color: var(--ink);
  font-size: 1.1875rem;
}

/* Closing search */

.close {
  padding-bottom: var(--screen-gap);
}

.close .search {
  margin-top: 2rem;
  max-width: 32rem;
}

.close .menu-line {
  color: var(--ink);
}

.close .menu-line::after {
  transform: scaleX(1);
}

/* passing the site on: a quiet Faded Ink question over the Share button, under the closing search */
.close-share {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--ink-dim);
}

.close-share .share {
  margin-top: 0.25rem;
}

/* The training page: the home page's screens. Its first screen is the page's contents as a menu beside the drawn
   belt; the levels are path stations that stay one column, each holding the dojo's own belts in wells. */

.training-screen {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}

.training-head h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5.25rem);
  max-width: 11ch;
}

.training-screen .ink-belt {
  margin-top: clamp(2rem, 5vw, 3rem);
  max-width: 40rem;
}

.training-screen + .screen {
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.stations.levels {
  gap: clamp(2.5rem, 6vw, 3.5rem);
}

.level h3.menu-line {
  justify-self: start;
  font-family: var(--text);
  letter-spacing: normal;
}

/* a heading that wraps on a phone spans the column, so the brush hangs from its words instead:
   the span runs from the first line's start to the last line's end */
.level h3.menu-line::after {
  content: none;
}

.level h3.menu-line > span {
  position: relative;
  padding-bottom: 0.5rem;
}

.levels .station p {
  max-width: var(--measure);
}

.level-belt {
  margin-top: 0.25rem;
}

.level-words {
  margin-top: 1rem;
}

/* rows of three, so blue and red (or green and brown) each get a row */
.belts {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 0.5rem;
  margin-top: 1rem;
}

.belt-well {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 2.75rem;
  padding: 0.25rem;
  border: 1px solid var(--slate);
  background: var(--rail);
}

.belt-well img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.weapons-line {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  max-width: var(--measure);
  color: var(--ink-dim);
}

.weapons-line strong,
.elements dd strong {
  color: var(--ink);
  font-weight: 500;
}

/* Earth, Water, Fire and Wind as ruled rows; Void, still to come, in Faded Ink */
.elements {
  max-width: 48rem;
  margin-top: 1.75rem;
  border-bottom: 1px solid var(--slate);
}

.elements > div {
  display: grid;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  padding: 1.125rem 0;
  border-top: 1px solid var(--slate);
}

.elements dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}

.elements dd {
  margin: 0;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.element-later dt {
  color: var(--ink-dim);
}

.elements-after {
  max-width: var(--measure);
  margin-top: 1.75rem;
  color: var(--ink-dim);
}

.elements-after p + p,
.creed p + p {
  margin-top: 1rem;
}

@media (min-width: 30rem) {
  .elements > div {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
}

@media (min-width: 40rem) {
  .belt-well {
    width: 7.5rem;
    height: 4.5rem;
    padding: 0.5rem;
  }
}

@media (min-width: 60rem) {
  .training-screen {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: center;
  }

  .training-screen .ink-belt {
    margin-top: 0;
    max-width: none;
  }

  /* the home page's stations turn into a row here; the levels stay a column, with the belts beside the words */
  .stations.levels {
    grid-template-columns: none;
    padding-top: 0;
    padding-left: 2rem;
  }

  .stations.levels::before {
    top: 1rem;
    bottom: 1rem;
    right: auto;
    border-top: 0;
    border-left: 1px solid var(--slate);
  }

  .levels .station::before {
    left: -2rem;
    top: 0.9rem;
  }

  .level {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: 3rem;
    align-content: start;
  }

  .level > :not(.belts) {
    grid-column: 1;
  }

  .level .belts {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    margin-top: 0.5rem;
  }
}

/* Footer */

.footer {
  flex-wrap: wrap;
  border-top: 1px solid var(--slate);
  padding-block: 2rem 2.5rem;
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.footer .brand {
  color: var(--ink);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1.5rem;
  font-style: normal;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  width: 100%;
}

.footer-links a,
.footer-contact a {
  display: inline-block;
  padding: 0.5rem 0;
  text-decoration: none;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-contact a {
  font-variant-numeric: tabular-nums;
}

/* the dojo's social profiles, as marks in Faded Ink on a line of their own, Paper Ink under the pointer; each a
   touch-sized target named for screen readers ("NinjaDojo on Facebook") */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-left: -0.75rem;
}

.footer-social .social {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--ink-dim);
  transition: color 0.2s;
}

.footer-social .social:hover {
  color: var(--ink);
}

.social-mark {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-mark .solid {
  fill: currentColor;
  stroke: none;
}

/* the maker's credit closes the footer on a line of its own */
.footer .maker-credit {
  width: 100%;
}

/* the sign-in frame's credit sits in the top bar's container, under the brand */
.credit-footer {
  max-width: 82rem;
}

/* Inner public pages (group finder, start a group, workshops): a screen with the page title at headline size */

.page {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) var(--screen-gap);
}

.page-head {
  max-width: var(--measure);
}

.page h1 {
  font-size: clamp(2.125rem, 1.5rem + 3vw, 4rem);
}

.page-head .search {
  margin-top: 1.75rem;
}

.page-part {
  margin-top: clamp(3rem, 7vw, 4.5rem);
}

.page-part > h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
}

.page-note {
  margin-top: 0.75rem;
  max-width: var(--measure);
  color: var(--ink-dim);
}

.page-part > .menu {
  margin-top: 1.25rem;
}

/* A gold jump to the page's form, for a page whose form sits below a long part */
.page-jump {
  margin-top: 1.75rem;
}

/* What the dojo does for a leader (start a group): a ruled list, each line led by its point in Paper Ink; two
   columns once there is room, so the form is not far below */
.gains {
  max-width: var(--measure);
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--slate);
}
.gains li {
  padding: 1.125rem 0;
  border-top: 1px solid var(--slate);
  color: var(--ink-dim);
}
.gains strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-weight: 500;
}
@media (min-width: 48rem) {
  .gains {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
    max-width: 60rem;
  }
}

/* The group finder: a ruled list, each group's details beside its map */

.group-list,
.workshop-list {
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--slate);
}

.group,
.workshop {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--slate);
}

.group h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.group h3 a:hover {
  text-decoration-thickness: 2px;
}

/* when the group trains: what most people look for first, so it sits right under the name */
.group-times {
  margin-top: 0.375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.group-times.is-unknown {
  color: var(--ink-dim);
  font-weight: 400;
}

.group-address {
  margin-top: 0.5rem;
  color: var(--ink-dim);
}

.group-leaders {
  margin-top: 0.75rem;
  color: var(--ink-dim);
}

.group-leaders span {
  color: var(--ink);
  font-weight: 500;
}

.group-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-top: 0.5rem;
}

.group-contact a,
.group-directions a {
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.group-contact a:hover,
.group-directions a:hover {
  text-decoration-thickness: 2px;
}

/* A group's own page: one way to message the leader under the title, then the facts beside the map */

.group-ask {
  margin-top: 1.75rem;
}

.group-detail {
  display: grid;
  gap: 2rem;
}

.group-detail .group-facts {
  max-width: 30rem;
  margin-top: 0;
}

.group-time {
  display: block;
  font-variant-numeric: tabular-nums;
}

/* a note standing alone (no times yet) lines up with its label */
.group-facts dd > .sub:first-child {
  margin-top: 0;
}

.group-reach {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.group-reach a,
.group-fact-link {
  display: inline-block;
  padding: 0.375rem 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.group-fact-link {
  display: table;
  margin-top: 0.25rem;
  font-size: 0.9375rem;
}

.group-reach a:hover,
.group-fact-link:hover {
  text-decoration-thickness: 2px;
}

.group-elsewhere {
  margin-top: 1.75rem;
}

/* the programme pages pass themselves on: a line saying who to send it to, then the Share button */
.programme-pass {
  margin-top: 1.25rem;
}

.programme-pass + .share {
  margin-top: 0.25rem;
}

/* The workshop list: each workshop's facts and the two ways to book, beside its picture */

.workshop-list {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.workshop h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
}

.workshop-when {
  margin-top: 0.5rem;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.workshop .auth-facts {
  max-width: 30rem;
  margin-top: 1.5rem;
}

.workshop .workshop-picture {
  margin-top: 0;
}

.workshop-ways {
  margin-top: 1.25rem;
}

.workshop h2 a:hover {
  text-decoration-thickness: 2px;
}

/* where a workshop stands when it cannot be booked: in words, the day in Paper Ink */
.workshop-state {
  margin-top: 1.25rem;
  color: var(--ink-dim);
}

.workshop-state strong {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* A workshop's own page: one way to book under the title, then the facts beside the picture */

.workshop-page .workshop-when {
  margin-top: 0.75rem;
  color: var(--ink);
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 500;
}

/* the day is the answer a shared link is opened for, so it reads above the Faded Ink description */
.workshop-page .page-head .workshop-when + .lede {
  margin-top: 0.75rem;
}


.workshop-book {
  margin-top: 1.75rem;
}

.workshop-member {
  margin-top: 1rem;
  color: var(--ink-dim);
}

.workshop-member a {
  color: var(--ink);
  font-weight: 500;
}

.workshop-member a:hover {
  text-decoration-thickness: 2px;
}

.workshop-page .workshop-state {
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
}

.workshop-detail {
  display: grid;
  gap: 2rem;
}

.workshop-detail .workshop-facts {
  max-width: 30rem;
  margin-top: 0;
}

.workshop-detail .workshop-picture {
  margin-top: 0;
}

.workshop-elsewhere {
  margin-top: 1.75rem;
}

/* both ways in are live choices, so they read in full ink; the brush still marks the one under the pointer */
.workshop-ways .menu-line {
  color: var(--ink);
}

.group-map {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  background: var(--ground);
}

/* Sign-in and password pages */

.auth {
  max-width: 30rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) var(--gutter) clamp(4rem, 10vw, 8rem);
}

.auth h1 {
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
}

.auth .lede {
  margin-top: 0.75rem;
}

.auth .notice,
.auth .problem,
.page .notice,
.page .problem {
  margin-top: 1.5rem;
  font-weight: 500;
}

.auth .problem,
.page .problem {
  color: var(--failure);
}

.page .notice,
.page .problem,
.page-form {
  max-width: 30rem;
}

.auth-form {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

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

.auth-field {
  display: grid;
  gap: 0.5rem;
}

.auth-field label {
  font-weight: 700;
}

.auth-field .search-field {
  width: 100%;
}

textarea.search-field {
  height: auto;
  min-height: 8rem;
  padding: 0.75rem 0.875rem;
  line-height: 1.6;
  resize: vertical;
}

.auth-field .search-field[aria-invalid="true"] {
  border-color: var(--failure);
}

.auth-field .hint {
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

/* "Keep me signed in on this device": a checkbox row as tall as a field, its hint lined up under the words */
.auth-field .pick {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  font-weight: 400;
  cursor: pointer;
}
.auth-field .pick + .hint {
  margin-top: -0.625rem;
  padding-left: 2rem;
}
/* drawn like the fields: a square in a Paper Ink line, gold on hover; ticked, it fills gold with a night tick */
.auth-field .pick input[type="checkbox"] {
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent center / 0.875rem no-repeat;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}
.auth-field .pick:hover input[type="checkbox"] {
  border-color: var(--gold);
}
.auth-field .pick input[type="checkbox"]:checked {
  border-color: var(--gold);
  background-color: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3.25 3 5.75-7' fill='none' stroke='%230e0f11' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.auth-field .pick input[type="checkbox"]:checked:focus-visible {
  outline-color: var(--ink);
}
@media (forced-colors: active) {
  .auth-field .pick input[type="checkbox"] {
    appearance: auto;
  }
}

.auth-more {
  margin-top: 2rem;
  display: grid;
  gap: 0.25rem;
}

.auth-more .menu-line:hover,
.auth-more .menu-line:focus-visible {
  color: var(--ink);
}

.auth-more .menu-line:hover::after,
.auth-more .menu-line:focus-visible::after {
  transform: scaleX(1);
}

.auth-more .menu-line:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.auth .aside,
.page .aside {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--slate);
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

/* Stand-in checkout (local development and tests only): the sign-in column, the payment's facts as ruled lines */

.checkout-facts,
.auth-facts {
  margin-top: 2rem;
  border-top: 1px solid var(--slate);
}

.checkout-facts > div,
.auth-facts > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--slate);
}

.checkout-facts dt,
.auth-facts dt {
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.checkout-facts dd,
.auth-facts dd {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.auth-facts .sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-dim);
  font-size: 0.9375rem;
  font-weight: 400;
}

.auth-facts .sub a {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

/* A workshop's booking page and a guest's own booking: the sign-in column with the workshop's facts */

.workshop-picture {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 2rem;
}

.workshop-about {
  margin-top: 1.5rem;
  max-width: var(--measure);
}

.auth .closed {
  margin-top: 2rem;
  color: var(--ink-dim);
}

.checkout .reference {
  font-variant-numeric: tabular-nums;
}

.checkout-pay {
  margin-top: 2rem;
}

.auth-more button.menu-line {
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

/* Programme pages (Ninjas@Work, Ninjas@Campus, Ninjas@Gym): the host's questions are the menu, the chosen one's
   answer stands beside it. The questions are radios, so the brush and the answer move without a script. */

.at {
  color: var(--ink-dim);
}

.programme .questions-head h1 {
  font-size: clamp(2.375rem, 1.6rem + 4.2vw, 5.25rem);
}

.questions {
  min-width: 0;
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  padding: 0;
  border: 0;
}

.questions .menu-item {
  position: relative;
  padding: 0.125rem 0;
}

.questions .menu-line {
  cursor: pointer;
}

/* the checked question is the selected line */
.questions .menu-item:has(:checked) .menu-line {
  color: var(--ink);
}
.questions .menu-item:has(:checked) .menu-line::after {
  transform: scaleX(1);
}

/* the cursor leaves the checked line while the pointer is on another question */
.questions:has(.menu-item:hover) .menu-item:has(:checked):not(:hover) .menu-line {
  color: var(--ink-dim);
}
.questions:has(.menu-item:hover) .menu-item:has(:checked):not(:hover) .menu-line::after {
  transform: scaleX(0);
}

/* the brush already marks the checked line, so a keyboard user also gets a ring: ink, and wide enough to clear the
   brush, so there are never two gold marks on one line */
.questions input:focus-visible + .menu-line {
  outline: 2px solid var(--ink);
  outline-offset: 0.625em;
}

.answers {
  max-width: var(--measure);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--slate);
}

/* each answer settles in from a softer, slightly lower start when its question is chosen */
.answer {
  animation: answer-in 0.35s var(--ease-out);
}

@keyframes answer-in {
  from {
    opacity: 0.35;
    transform: translateY(0.375rem);
  }
}


.answer h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
}

/* Each answer's heading starts with its question, so moving by headings hears both. Where answers stand one after
   the other (every answer at once, or no :has()), the question leads at the menu's size and the rest of the heading
   reads as the answer's bold first line: never a small label over a bigger heading. */
.answer .answer-question {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.every-answer .answer h2 {
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0;
}

.every-answer .answer h2 + p {
  margin-top: 0.25rem;
}

@supports not selector(:has(*)) {
  .answer h2 {
    font-family: var(--text);
    font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0;
  }

  .answer h2 + p {
    margin-top: 0.25rem;
  }
}

.answer p {
  margin-top: 1rem;
  color: var(--ink-dim);
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
}

.answer strong {
  color: var(--ink);
  font-weight: 500;
}

/* without :has() every answer shows, one after the other */
.answer + .answer {
  margin-top: 2.5rem;
}

@supports selector(:has(*)) {
  .answer {
    display: none;
  }

  .answer + .answer {
    margin-top: 0;
  }

  /* one answer at a time: the menu shows the question, so the heading's question is only read out */
  .answer .answer-question {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .questions-screen:has(.menu-item:nth-of-type(1) :checked) .answer:nth-of-type(1),
  .questions-screen:has(.menu-item:nth-of-type(2) :checked) .answer:nth-of-type(2),
  .questions-screen:has(.menu-item:nth-of-type(3) :checked) .answer:nth-of-type(3),
  .questions-screen:has(.menu-item:nth-of-type(4) :checked) .answer:nth-of-type(4),
  .questions-screen:has(.menu-item:nth-of-type(5) :checked) .answer:nth-of-type(5),
  .questions-screen:has(.menu-item:nth-of-type(6) :checked) .answer:nth-of-type(6) {
    display: block;
  }
}

/* phones: the gold button sits under the lede, so the action is on the first screen and each answer follows the menu */
.questions-screen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.questions-head {
  order: 1;
}

.questions-ask {
  order: 2;
  margin-top: 1.75rem;
}

/* every answer at once: the menu steps aside and each answer stands under its question */
.every-answer .questions {
  display: none;
}

.every-answer .answer {
  display: block;
}

.every-answer .answer .answer-question {
  position: static;
  width: auto;
  height: auto;
  margin-bottom: 0.75rem;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}

.every-answer .answer + .answer {
  margin-top: 2.5rem;
}

.answers-every {
  margin-top: 1.5rem;
}

.answers-every a {
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 500;
}
.answers-every a:hover {
  text-decoration-thickness: 2px;
}

.questions {
  order: 3;
}

.answers {
  order: 4;
  align-self: stretch;
}

/* Live choices, so every line reads in full ink; the brush marks the one under the pointer (home and programmes) */
.hosted-menu .menu-line,
.training-contents .menu-line,
.programme-others .menu-line,
.group-elsewhere .menu-line,
.workshop-elsewhere .menu-line {
  color: var(--ink);
}

.hosted-menu {
  margin-top: 2rem;
}

.menu-note {
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.training-list {
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--slate);
}

.training-list li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--slate);
}

.training-list h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.training-find {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.5rem 0;
  font-weight: 500;
}
.training-find:hover {
  text-decoration-thickness: 2px;
}

/* "Who are you?" on the enquiry form: one radio per line, each a full touch-sized row */
.asked-as {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 0;
}

.asked-as legend {
  padding: 0;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.asked-as .pick {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  font-weight: 400;
  cursor: pointer;
}

.pick input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
}

.asked-as[aria-invalid="true"] .pick input {
  outline: 1px solid var(--failure);
  outline-offset: 2px;
}

/* A hosted group in the finder says where it trains and who to ask */
.group-host {
  margin-top: 0.5rem;
  color: var(--ink-dim);
}

.page .aside-more {
  margin-top: 0.75rem;
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.aside-more a {
  color: var(--ink);
  font-weight: 500;
}

/* Wider screens */

@media (min-width: 40rem) {
  .armory {
    grid-template-columns: 1fr 1fr;
  }

  .weapon-wide {
    grid-column: 1 / -1;
  }

  .weapon-wide .ink {
    max-width: 52rem;
  }
}

@media (min-width: 60rem) {
  .title-screen {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    min-height: min(calc(100svh - 4.5rem), 46rem);
    padding-bottom: 0;
  }

  .title-block {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    z-index: 1;
  }

  .ink-katana-scene {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    width: 64%;
    margin: 0 calc(var(--gutter) * -0.5) 0 0;
  }

  .stations {
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    padding-left: 0;
    padding-top: 2rem;
  }

  .stations::before {
    left: 0.4375rem;
    right: 0;
    top: 0.4375rem;
    bottom: auto;
    border-left: 0;
    border-top: 1px solid var(--slate);
  }

  .station::before {
    left: 0;
    top: -2rem;
  }

  .instructor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4rem;
  }

  .instructor-mark {
    margin: 0;
  }

  .footer-links {
    width: auto;
  }

  .group,
  .workshop {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
  }

  .group-text,
  .workshop-text {
    grid-column: 1;
  }

  .group-map,
  .workshop .workshop-picture {
    grid-column: 2;
  }

  .group-detail {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
  }

  .workshop-detail {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
  }

  .workshop-detail:not(:has(.workshop-picture)) {
    grid-template-columns: minmax(0, 40rem);
  }

  .workshop-detail:not(:has(.workshop-picture)) .workshop-facts {
    max-width: none;
  }

  /* without a map the facts take the width, held to a readable measure */
  .group-detail:not(:has(.group-map)) {
    grid-template-columns: minmax(0, 40rem);
  }

  .group-detail:not(:has(.group-map)) .group-facts {
    max-width: none;
  }

  /* the questions and the gold button on the left, the chosen answer beside them on a Slate rule */
  .questions-screen {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas:
      "head ."
      "menu answers"
      "ask answers";
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(3rem, 5vw, 4.5rem);
  }

  .questions-head {
    grid-area: head;
  }

  .questions {
    grid-area: menu;
  }

  .questions .menu-item {
    padding: 0.375rem 0;
  }

  .every-answer {
    grid-template-areas:
      "head ."
      "ask answers";
    grid-template-rows: auto 1fr;
  }

  /* the action stays in view beside the long list of answers */
  .every-answer .questions-ask {
    position: sticky;
    top: 2rem;
  }

  .questions-ask {
    grid-area: ask;
    align-self: start;
    justify-self: start;
    margin-top: 2rem;
  }

  .answers {
    grid-area: answers;
    align-self: start;
    max-width: 38rem;
    margin-top: clamp(1.75rem, 4vw, 2.75rem);
    padding: 0.5rem 0 0.5rem clamp(2.5rem, 4vw, 3.5rem);
    border-top: 0;
    border-left: 1px solid var(--slate);
  }

  .programme-form {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 5vw, 4.5rem);
    align-items: start;
  }

  .programme-form .form-body {
    padding: 0.5rem 0 0.5rem clamp(2.5rem, 4vw, 3.5rem);
    border-left: 1px solid var(--slate);
  }

  .programme-form .form-body > :first-child {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slash,
  .gust,
  .answer {
    animation: none;
  }

  .menu-line,
  .menu-line::after,
  .button {
    transition: none;
  }
}
