/* Mountain Standard: "Set it in 2012. Set it now." The creative director's piece (docs/notes/v4/creative/CASE-DATA.md), brought onto the
   case page from its proof, v4/lab/ms-letters.html, unchanged in what it does (Brian has seen the proof; D107). Generated from that
   file by a script (scratchpad port.py): edit the proof and port again rather than editing here. Classes msx-. */

  /* The real 2012 file, for the 2012 row only (Brian 2026-11-13: with the new letters in both rows, a line in capitals looked the same
     twice). Its 26 capitals keep their 2012 shapes; anything else stays an empty box. Converted by scratchpad font2012.py. This part
     is edited here, not ported from the proof. */
  @font-face { font-family: "MS 2012"; src: url(../../fonts/MountainStandard-2012.woff) format("woff"); font-weight: 400 700; font-display: block; size-adjust: 97%; }   /* 97%: its capitals stand as tall as the new ones */
  .msx-set#msx-then { font-family: "MS 2012", "MTN Display", var(--disp); font-synthesis: none; font-kerning: none; }
  @font-face { font-family: "MTN Display"; src: url(../../fonts/MTNStandardDisplay-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
  @font-face { font-family: "MTN Display"; src: url(../../fonts/MTNStandardDisplay-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
  .msx { --g: #1f1d1b; --c: #f2e8d6; --a: #d2814a; --soft: rgba(242, 232, 214, .82); --rule: rgba(242, 232, 214, .24); background: var(--g); color: var(--c); min-height: 100vh; }
  .msx-hd { position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: var(--hd, 64px); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); background: rgba(12, 13, 16, .97); border-bottom: 1px solid var(--rule); }
  .msx-hd .small { color: var(--paper); opacity: .8; }
  .msx-in { padding: calc(var(--hd, 64px) + clamp(36px, 8vh, 96px)) var(--pad) clamp(56px, 10vh, 120px); display: grid; gap: clamp(26px, 4.4vh, 48px); }
  .msx .msx-h1, .msx .msx-h2 { font-family: "MTN Display", var(--disp); font-weight: 700; text-transform: none; letter-spacing: .005em; margin: 0; }
  .msx .msx-h1 { font-size: clamp(2rem, 4.6vw, 4.6rem); line-height: 1; }
  .msx-lede { max-width: 36em; font-size: clamp(1.05rem, 1.3vw, 1.3rem); line-height: 1.45; color: var(--soft); margin: 0; }

  /* the line to set */
  .msx-ask { display: grid; gap: 12px; }
  .msx-ask label { font-size: 15px; color: var(--soft); }
  .msx-ask input { width: 100%; max-width: 34em; min-height: 52px; padding: 10px 16px; background: transparent; color: var(--c); border: 1px solid var(--rule); border-radius: 2px; font: inherit; font-size: 18px; }
  .msx-ask input:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
  .msx-try { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; color: var(--soft); }
  .msx-try button { appearance: none; min-height: 44px; padding: 8px 14px; text-align: left; background: transparent; color: var(--c); border: 1px solid var(--rule); border-radius: 2px; font: inherit; font-size: 15px; cursor: pointer; }
  .msx-try button[aria-pressed="true"] { border-color: var(--a); color: var(--a); }
  .msx-try button:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

  /* the two settings */
  .msx-two { display: grid; gap: clamp(18px, 3vh, 30px); border-top: 1px solid var(--rule); padding-top: clamp(18px, 3vh, 30px); }
  .msx-row { display: grid; grid-template-columns: minmax(4.6rem, 7rem) minmax(0, 1fr); gap: clamp(12px, 2vw, 28px); align-items: start; }
  .msx-when { font-family: "MTN Display", var(--disp); font-weight: 400; color: var(--a); font-size: clamp(1rem, 1.3vw, 1.3rem); padding-top: .5em; }
  .msx-set { font-family: "MTN Display", var(--disp); font-weight: 700; font-size: clamp(1.6rem, 4.5vw, 4.5rem); line-height: 1.12; margin: 0; min-height: 1.12em; }
  .msx-set span { white-space: nowrap; }   /* a word and the empty places that belong to it stay together */
  .msx-set i { font-style: normal; display: inline-block; width: .56em; height: .72em; margin: 0 .04em; vertical-align: baseline; border: 1px dashed var(--a); border-radius: 1px; }   /* a place the 2012 letters could not fill */
  .msx-set i.sp { border: 0; width: .3em; }
  .msx-say { grid-column: 2; font-size: clamp(.98rem, 1.15vw, 1.12rem); line-height: 1.4; color: var(--soft); margin: 6px 0 0; min-height: 2.8em; }
  .msx-say b { color: var(--c); font-weight: 600; }
  /* each character the line needed and the letters did not have, in its own marked box, so a comma or a dot reads as a character and not as punctuation */
  .msx-ch { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: .1em .5em; margin: 2px 2px; border: 1px dashed var(--a); border-radius: 1px; color: var(--c); font-family: "MTN Display", var(--disp); font-weight: 400; font-size: 1.05em; line-height: 1; vertical-align: middle; }
  .msx-ch.plain { font-family: inherit; }

  /* every character it has */
  .msx-all { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 300px); gap: clamp(20px, 4vw, 56px); align-items: start; border-top: 1px solid var(--rule); padding-top: clamp(18px, 3vh, 30px); }
  .msx-allh { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
  .msx-allh h2 { font-size: clamp(1.3rem, 2.1vw, 2.1rem); }
  .msx-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--soft); }
  .msx-key span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px; background: var(--c); }
  .msx-key .k-then::before { background: var(--a); }
  .msx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; outline: none; }
  .msx-grid:focus-visible { outline: 2px solid var(--c); outline-offset: 6px; }
  .msx-cell { aspect-ratio: 1; display: grid; place-items: center; font-family: "MTN Display", var(--disp); font-weight: 400; font-size: 21px; line-height: 1; color: rgba(242, 232, 214, .5); border: 1px solid transparent; cursor: pointer; user-select: none; -webkit-user-select: none; }
  .msx-cell.then { color: var(--a); }
  .msx-cell.used { color: var(--c); background: rgba(242, 232, 214, .1); }
  .msx-cell.then.used { color: var(--g); background: var(--a); }
  .msx-cell.on { border-color: var(--c); }
  .msx-big { position: sticky; top: calc(var(--hd, 64px) + 20px); display: grid; gap: 10px; justify-items: start; }
  .msx-glyph { font-family: "MTN Display", var(--disp); font-weight: 700; font-size: clamp(6rem, 13vw, 12rem); line-height: 1; min-height: 1em; min-width: .6em; }
  .msx-big p { margin: 0; font-size: 15px; line-height: 1.4; color: var(--soft); }
  .msx-big p b { color: var(--c); font-weight: 600; }
  .msx-big .is-then { color: var(--a); }
  .msx-note { font-size: 14px; color: rgba(242, 232, 214, .7); max-width: 46em; margin: 0; }

  @media (max-width: 899px) {
    .msx-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .msx-when { padding-top: 0; }
    .msx-say { grid-column: 1; }
    .msx-all { grid-template-columns: minmax(0, 1fr); }
    .msx-big { position: static; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; order: -1; grid-column: 1; }
    .msx-allh { order: -2; }
    .msx-glyph { font-size: 5.4rem; }
    .msx-grid { grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); }
    .msx-cell { font-size: 19px; }
  }

/* on the case page it sits inside the lettering block, not as a page of its own */
.msl-all .msx { min-height: 0; background: none; }
.msl-all .msx-in { padding: 0; }

/* the two long dashes in the character chart are drawn by CSS, not written as text (see ms-letters.js) */
.msx .is-en::before { content: "\2013"; }
.msx .is-em::before { content: "\2014"; }

  /* one letter, close */
  .msx-set u.msx-l { text-decoration: none; cursor: pointer; }
  .msx-set u.msx-l.on { color: var(--a); }
  .msx-near { display: grid; gap: 14px; border-top: 1px solid var(--rule); padding-top: clamp(18px, 3vh, 30px); }
  .msx-near[hidden] { display: none; }
  .msx-nearh { margin: 0; font-size: clamp(1rem, 1.2vw, 1.15rem); color: var(--soft); }
  .msx-nearh b { color: var(--c); font-weight: 600; }
  .msx-near3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 28px); max-width: 980px; }
  .msx-near3 figure { margin: 0; display: grid; gap: 8px; justify-items: center; border: 1px solid var(--rule); border-radius: 2px; padding: clamp(8px, 1.6vw, 20px) 4px 12px; }
  .msx-near3 figcaption { font-size: 15px; line-height: 1.3; color: var(--soft); text-align: center; padding: 0 6px; }
  /* the box is set in the new face so both letters sit on one baseline, whichever file they come from */
  .msx-g { position: relative; display: block; width: 100%; text-align: center; font-family: "MTN Display", var(--disp); font-weight: 700; font-synthesis: none; font-size: clamp(4.6rem, 17vw, 13rem); line-height: 1.5; height: 1.5em; }
  .msx-g .g-then { font-family: "MS 2012", "MTN Display", var(--disp); }
  .msx-g.g-both canvas { display: block; }
  .msx-nearb { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 15px; color: var(--soft); }
  .msx-nearb button { appearance: none; min-height: 44px; padding: 8px 14px; background: transparent; color: var(--c); border: 1px solid var(--rule); border-radius: 2px; font: inherit; font-size: 15px; cursor: pointer; }
  .msx-nearb button:disabled { opacity: .45; cursor: default; }
  .msx-nearb button:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

  /* a / A under the Now row, the two letters set in MTN Standard Simple */
  @font-face { font-family: "MTN Simple"; src: url(../../fonts/MTNStandardSimple-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
  @font-face { font-family: "MTN Simple"; src: url(../../fonts/MTNStandardSimple-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
  .msx-case { grid-column: 2; display: flex; align-items: center; gap: 0 12px; margin-top: 10px; font-size: 15px; color: var(--soft); }
  .msx-case button { appearance: none; min-width: 48px; min-height: 44px; padding: 4px 12px; background: transparent; color: var(--c); border: 1px solid var(--rule); border-radius: 2px; cursor: pointer; font-family: "MTN Simple", "MTN Display", var(--disp); font-weight: 700; font-size: 24px; line-height: 1; }
  .msx-case button + button { margin-left: -13px; }
  .msx-case button[aria-pressed="true"] { background: var(--c); color: var(--g); border-color: var(--c); }
  .msx-case button:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
  @media (max-width: 899px) { .msx-case { grid-column: 1; } }
