/* biome-ignore-all lint/complexity/noImportantStyles: the site's home places its phone taps with !important (home.css, a copy); Rescue's notes sit elsewhere, and only !important moves them */
/* Rescue's home on otramusic.com's home system. home.css is the site's home, copied; this file is only
   what Rescue adds: the theme words rescue.css's shared pieces read (language note, waiting list,
   footer languages), the tool's name in the nav, the hero's Morning Song, the privacy aside, the
   report card and ticks, the apps' tags, the plan bars' lists and the waiting list in the close. */
/* while Instrument Sans loads, Arial stands in at its width, weight by weight: measured on this
   page's own words, then set a touch wide until no hero line in English, German, French or Spanish
   wraps differently at 360 to 1440 px. A slow phone's font swap then moves nothing (CLS on /de/ was
   0.072: the lede, set at 500, gained a line when the font arrived). */
@font-face {
  font-family: "Instrument Sans fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  size-adjust: 103.5%;
}
@font-face {
  font-family: "Instrument Sans fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 500;
  size-adjust: 105.5%;
}
@font-face {
  font-family: "Instrument Sans fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600;
  size-adjust: 99%;
}
@font-face {
  font-family: "Instrument Sans fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700;
  size-adjust: 100.2%;
}
body.home {
  --text: "Instrument Sans", "Instrument Sans fallback", "Helvetica Neue", Arial, sans-serif;
  --fg: var(--ink);
  --bg: var(--paper);
  --accent: var(--purple);
  --on-accent: var(--paper);
  --pad: var(--edge);
}

/* the nav names the tool beside the logo */
nav.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
nav.nav .brand b {
  font: 800 1.5rem / 1 var(--display);
  letter-spacing: -0.01em;
  text-transform: lowercase;
  translate: 0 0.1em;
}
@media (max-width: 600px) {
  nav.nav .logo {
    width: 4.4rem;
  }
  nav.nav .brand {
    gap: 0.35rem;
  }
  nav.nav .brand b {
    font-size: 1.05rem;
  }
}

/* the hero's phrase is the two bars Morning Song.enc holds: 4/4, C D E F, a whole-note G, "Morn-ing" */
.art .ts {
  fill: var(--ink);
}
.art .ly {
  fill: var(--soft);
  font-family: var(--text);
}
.art .note .i {
  fill: var(--paper);
}
/* a phone's three notes: C on its ledger line, D, E */
@media (max-width: 700px) {
  .taps button:nth-child(1) {
    --x: 114 !important;
    --y: 185 !important;
  }
  .taps button:nth-child(2) {
    --x: 160 !important;
    --y: 179.5 !important;
  }
  .taps button:nth-child(3) {
    --x: 206 !important;
    --y: 174 !important;
  }
}

/* how it works: the site's ribbon section, its heading set to wrap */
/* Rescue's preview is drawn on a clear page: it sits on white inside the ink window */
#what .window img {
  background: #fff;
}
#how {
  overflow: clip;
  padding-bottom: calc(var(--u) * 8 * var(--sk));
}
#how .bend h2 {
  max-width: calc(var(--u) * 64);
  font-size: calc(min(var(--u) * 4.8, 4.4rem) * var(--hk));
  white-space: normal;
}
.rescue .aside {
  margin-bottom: 0.7rem;
  font: var(--k-hweight, 800) clamp(1.5rem, calc(var(--u) * 2.1), 2.2rem) / 1 var(--display);
  letter-spacing: -0.02em;
  text-transform: var(--k-hcase, lowercase);
}
/* only the file that goes in wears ink; what comes out stays an outline */
.rescue .tags .tag:nth-child(2) {
  border-color: currentColor;
  background: none;
  color: inherit;
}

/* what comes across: the report card on paper inside the tinted band, the ticks as note heads */
.editor .report {
  max-width: 32rem;
  margin: 1.6rem 0 0;
  padding: 1.1rem 1.3rem 1.2rem;
  border-radius: calc(1.4rem * var(--rk));
  background: var(--paper);
}
.report .file {
  font: 800 1.15rem / 1.2 var(--display);
}
.report .count {
  display: inline-flex;
  margin-top: 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
  background: var(--purple);
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 600;
}
.report .line,
.editor .ticks li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-weight: 600;
}
.report .line {
  margin-top: 0.7rem;
}
.report .line::before,
.editor .ticks li::before {
  content: "";
  flex: none;
  width: 0.72rem;
  height: 0.54rem;
  border-radius: 50%;
  background: var(--purple);
  rotate: -20deg;
}
.report figcaption {
  margin-top: 0.7rem;
  color: var(--soft);
  font-size: 0.86rem;
}
.editor .ticks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.6rem;
  max-width: 36rem;
  margin: 1.6rem 0 1.2rem;
}
.editor .ticks li {
  font-size: 0.95rem;
  line-height: 1.35;
}
.editor .fine {
  max-width: 36rem;
  font-size: 0.86rem;
}

/* where it opens: the violet band's rows, a filled tag for what we check and an outline for the rest */
.kit .body {
  color: var(--onp);
}
.kit .rows li > div {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
}
.kit .rows .tag {
  margin-top: 0;
}
.kit .rows .tag.on {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--purple);
}
.kit .more {
  max-width: 44em;
  margin-top: 2.4rem;
}
.kit .fine {
  max-width: 44em;
  margin-top: 1rem;
  color: var(--onp);
  font-size: 0.86rem;
}

/* the plan bars: what each holds as one line of note heads, the price with its terms under it */
.plans .start {
  margin-top: 1.4rem;
}
.caps .feat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  max-width: 40em;
}
.caps .feat span {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.caps .feat span::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  rotate: -20deg;
}
.caps .cost {
  display: grid;
  justify-items: end;
}
.caps .cost small {
  font: 600 0.95rem / 1.2 var(--text);
  letter-spacing: 0;
}

/* the close: the editor's waiting list where the site asks for the trial, its screenshot beside it */
#editor.close h2 {
  padding-right: calc(var(--u) * 14);
  font-size: calc(var(--u) * 9.6 * var(--hk));
  white-space: normal;
}
.close .next {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: calc(var(--u) * 5);
  align-items: start;
  padding: calc(var(--u) * 2) calc(var(--u) * 11) calc(var(--u) * 7) calc(var(--u) * 3);
}
.close .next .body {
  max-width: 30em;
}
#editor.close .window {
  margin: 0;
}

@media (max-width: 1099px) {
  #how {
    padding-bottom: calc(4.5rem * var(--sk));
  }
  #how .bend h2 {
    max-width: none;
    font-size: calc(clamp(2.4rem, var(--u) * 5.4, 5.8rem) * var(--hk));
  }
  /* the preview shows its whole two bars; it doesn't run off the edge like the site's editor */
  #what .window {
    width: auto;
    margin: 2.6rem 0 0;
  }
  #what .window figcaption {
    width: auto;
  }
  #editor.close h2 {
    padding-right: var(--gut);
    font-size: calc(min(12vw, 5.4rem) * var(--hk));
  }
  .close .next {
    display: block;
    padding: 1rem var(--gut) 4rem 1.25rem;
  }
  #editor.close .window {
    width: auto;
    margin: 2.4rem 0 0;
  }
}
@media (max-width: 600px) {
  .editor .ticks {
    grid-template-columns: 1fr;
  }
  .caps .cost {
    justify-items: start;
  }
}

/* round 15 (blind critic, 7.35) */
/* every language's headline keeps its two lines clear of the lower staff and its disc: the longer
   languages set smaller, Japanese's full-height glyphs looser; the lede gets room for its longer
   translations, so it never reaches the buttons */
@media (min-width: 1100px) {
  html[lang="de"] .hero h1 {
    font-size: calc(var(--u) * 5.6 * var(--hk));
  }
  html[lang="es"] .hero h1 {
    font-size: calc(var(--u) * 4.9 * var(--hk));
  }
  html[lang="fr"] .hero h1 {
    font-size: calc(var(--u) * 4.4 * var(--hk));
  }
  html[lang="ja"] .hero h1 {
    font-size: calc(var(--u) * 5.2 * var(--hk));
    line-height: 1.12;
  }
  html:not([lang="en"]) .lede {
    width: calc(var(--u) * 43.5);
    font-size: clamp(1rem, calc(var(--u) * 1.28), 1.4rem);
  }
  /* German and French run long: a touch smaller, they keep to two lines short of the staff */
  html:is([lang="de"], [lang="fr"]) .lede {
    font-size: clamp(0.95rem, calc(var(--u) * 1.2), 1.3rem);
  }
  /* Japanese fills its line edge to edge, so it stops earlier */
  html[lang="ja"] .lede {
    width: calc(var(--u) * 41);
  }
  /* the headline block sits lower, using the hero's spare foot, so the lyric clears it */
  .hero h1 {
    bottom: calc(var(--u) * 13.2);
  }
  .lede {
    top: calc(var(--u) * 47.1);
  }
  .hero .cta {
    top: calc(var(--u) * 52.6);
  }
  .hero .fine {
    top: calc(var(--u) * 52.6 + 3.25rem + 0.7rem);
  }
  /* the plan bars end before the spine, as the list above them does */
  .plans .caps {
    margin-right: calc(var(--u) * 7.5);
  }
}
/* Japanese breaks its headings at phrases, never leaving a lone kana on a line */
html[lang="ja"] :is(.low, .rows h3, .caps h3) {
  word-break: auto-phrase;
  text-wrap: balance;
}
/* German keeps its capitals in display type: its nouns are capitalised, so no heading on the
   page lowercases them (every one of them reads --k-hcase) */
html[lang="de"] {
  --k-hcase: none;
}
/* the band's left column holds what we check, under the rest */
.kit .lead > :first-child .more {
  margin-top: 0;
}
/* the phone hero holds the whole phrase, as its caption says: 4/4, C D E F, a barline, the whole-note G
   and the final bar, with room under the lyric for its descenders. Five notes sit 29 units apart, so
   each tap target is 28 units (28 px at 390), clear of its neighbours and above the 24 px minimum. */
@media (max-width: 700px) {
  .art {
    height: calc(210 * var(--sx));
  }
  .taps button {
    width: calc(28 * var(--sx)) !important;
  }
  .taps button:nth-child(n) {
    display: block;
  }
  .taps button:nth-child(1) {
    --x: 124 !important;
  }
  .taps button:nth-child(2) {
    --x: 153 !important;
  }
  .taps button:nth-child(3) {
    --x: 182 !important;
  }
  .taps button:nth-child(4) {
    --x: 211 !important;
    --y: 168.5 !important;
  }
  .taps button:nth-child(5) {
    --x: 260 !important;
    --y: 163 !important;
  }
}
/* Japanese glyphs fill the full em, so the display headings' tight leading made lines touch; they
   take 1.2 and break at phrases, never leaving a kana and its full stop alone on a line */
/* biome-ignore lint/style/noDescendingSpecificity: sets leading and breaks only; #editor.close h2 sets its size */
html[lang="ja"] body.home h2 {
  line-height: 1.2;
  word-break: auto-phrase;
  text-wrap: balance;
}
/* on a phone "書き始めよう。" is seven full-width glyphs: at 12vw it can't stay one phrase */
@media (max-width: 1099px) {
  html[lang="ja"] #editor.close h2 {
    font-size: calc(min(10vw, 5.4rem) * var(--hk));
  }
}
/* the German close's comma ("Schreiben Sie,") hung onto the line below at 0.92 */
html[lang="de"] #editor.close h2 {
  line-height: 1;
}
