/* Phone pass (Lex, v19, November 15, 2026). One idea per screen, the detail on tap.
   Loaded after home.css and night.css on the homepage only. Everything here is below 768px unless it says
   otherwise. It replaces the rule that set every sentence on its own line: a paragraph is a paragraph again, and
   each of the three sections that had rows gets one large line and one flowing paragraph. Lex's sentences are not
   reworded; only their grouping and size change. */

/* The rules: the words that carry each rule are heavier, at every width. */
.rules-list li{color:#3A465E}
.rules-list strong{font-weight:600;color:var(--ink)}

/* The certifications sit in one <details>. From 768px it is always open and reads as before. */
.certs summary{list-style:none;cursor:default;pointer-events:none}
.certs summary::-webkit-details-marker{display:none}
.certs .cert-title{margin:20px 0 8px}
.cert-chips{display:none}

/* The step selector exists only on phones, with the script. */
.step-tabs,.step-pager{display:none}

@media(max-width:767px){
  /* A reload half-way down: phone.js changes the page's height after the browser has put the page back where it
     was, and with smooth scrolling the browser then scrolled the whole page down from the top. Until phone.js
     says the page has loaded, scrolling on a phone is instant. */
  html.js:not(.phone-ready){scroll-behavior:auto}

  /* 1. Sentences flow as a paragraph again in "I have worked these shifts" and Meet Lex. In the three steps each
     sentence is back on its own line (Lex, v20): the four-line rule holds there. */
  .story-p .sent,.about-bio .sent{display:inline;text-wrap:pretty}
  .story-p .sent+.sent,.about-bio .sent+.sent{margin-top:0}
  .story-p,.about-bio,.step-open{text-wrap:pretty}

  /* 2. My experience: an opening line, the turn as one large line, and the tool on a card. */
  .story-p:nth-child(1) .sent:first-child{display:block;margin-bottom:14px;font-size:20px;line-height:1.5;font-weight:500;color:#fff}
  .story-p:nth-child(2){margin-top:40px}
  .story-p:nth-child(2) .sent:first-child{display:block;color:var(--on-dusk)}
  .story-p:nth-child(2) .sent:last-child{display:block;margin-top:12px;font:500 36px/1.06 var(--serif);letter-spacing:-.012em;color:#fff}
  /* "The process had a gap.": a line that draws in and stops short of joining. It draws once the line itself is on
     screen (.gap-wait, phone.js) and its sentence has arrived (the paragraph's entrance classes are off: home.js
     section 2), never before (Lex, v20). */
  .story-p:nth-child(2):after{content:"";display:block;height:2px;margin-top:20px;border-radius:1px;background:linear-gradient(90deg,#8FB4EE 0 46%,#8FB4EE00 46% 58%,#8FB4EE 58% 100%);transform-origin:0 50%;transition:transform var(--t-slow) var(--ease) .1s}
  .story-p:nth-child(2):is(.a-wait,.a-in,.a-lines,.gap-wait):after{transform:scaleX(0);transition:none}
  .story-p:nth-child(3){margin-top:40px;padding:22px 20px;border:1px solid #f6f2e833;border-radius:14px;background:#f6f2e80f}
  .story-p:nth-child(3) .sent:first-child{display:block;margin-bottom:10px;font-size:19px;line-height:1.45;font-weight:600;color:#fff}
  .story-p:nth-child(3) .sent:last-child{display:block;margin-top:12px;font-weight:600;color:#fff}

  /* 3. The three steps: a selector, one step on screen. Without the script all three are stacked as before. */
  .js .step-tabs{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px;padding:5px;border-radius:999px;background:#E6EBF4}
  .step-tab{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 6px;border:0;border-radius:999px;background:none;font:600 15px/1 var(--sans);color:#3A465E;cursor:pointer;transition:color var(--t-move) var(--ease)}
  .step-tab b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;font:600 14px/1 var(--sans);color:var(--royal);transition:background-color var(--t-move) var(--ease)}
  .step-tab[aria-pressed="true"]{color:#fff}
  .step-tab:focus-visible{outline:2px solid var(--royal);outline-offset:2px;border-radius:999px}
  .step-tabs i{position:absolute;left:5px;top:5px;bottom:5px;width:calc((100% - 34px) / 3);border-radius:999px;background:var(--royal);box-shadow:0 6px 16px #2348a64d;transform:translateX(calc(var(--i,0) * (100% + 12px)));transition:transform var(--t-move) var(--ease)}
  .steps-tabbed .step:not(.is-current){display:none}
  /* A step slides in when the reader chooses it (.is-in: phone.js sets it and takes it off when the slide ends). */
  .steps-tabbed .step.is-current.is-in{animation:step-in var(--t-move) var(--ease) both}
  @keyframes step-in{from{opacity:0;transform:translateX(calc(var(--dir,1) * 22px))}to{opacity:1;transform:none}}
  .js .steps-tabbed .step-pager{display:flex;justify-content:flex-end;margin-top:16px}
  .step-pager button{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 4px;border:0;background:none;font:600 17px/1.3 var(--sans);color:var(--royal);cursor:pointer}
  .step-pager button:after{content:"";width:8px;height:8px;border:solid currentColor;border-width:2px 2px 0 0;transform:rotate(45deg)}
  /* Long text in the steps is in the reading face. */
  .step-open{font:400 17px/1.6 var(--sans);letter-spacing:0}

  /* 4. Meet Lex: one large line, one paragraph; the certifications open on a tap. */
  .about-bio .sent:first-child{display:block}
  .about-copy>.about-bio:nth-of-type(1) .sent:first-child{margin-bottom:12px;font:500 32px/1.08 var(--serif);letter-spacing:-.012em;color:var(--royal)}
  .about-copy>.about-bio:nth-of-type(2){margin-top:28px}
  .about-copy>.about-bio:nth-of-type(2) .sent:first-child{margin-bottom:6px;font-size:19px;line-height:1.45;font-weight:600}
  .certs{margin:16px 0 28px;border:1px solid var(--card-border);border-radius:var(--card-radius);background:var(--white);box-shadow:var(--card-shadow)}
  /* Without the script the card is open and its heading keeps the card's own margins. */
  .certs summary{padding:18px 20px 12px}
  .js .certs summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;min-height:56px;padding:12px 44px 12px 20px;position:relative;cursor:pointer;pointer-events:auto}
  .js .certs summary:after{content:"";position:absolute;right:22px;top:50%;width:8px;height:8px;margin-top:-7px;border:solid var(--royal);border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform var(--t-quick) var(--ease)}
  .js .certs[open] summary:after{margin-top:-2px;transform:rotate(-135deg)}
  .certs .cert-title{margin:0}
  .js .cert-chips{display:flex;gap:8px}
  .cert-chips i{padding:5px 9px;border-radius:999px;background:var(--panel);font:600 12px/1 var(--sans);font-style:normal;letter-spacing:.04em;color:var(--royal)}
  /* The three chips rise in one after the other as their card arrives (.a-in: home.js section 2), never a second time. */
  .js .certs.a-in .cert-chips i{animation:a-rise .4s var(--ease) calc(var(--d,0s) + .1s) both}
  .js .certs.a-in .cert-chips i:nth-child(2){animation-delay:calc(var(--d,0s) + .1s + var(--t-step))}
  .js .certs.a-in .cert-chips i:nth-child(3){animation-delay:calc(var(--d,0s) + .1s + var(--t-step) * 2)}
  .certs .cert-list{margin:0;padding:0 20px 6px;border:0;border-top:1px solid #e4e8ee;border-radius:0;background:none;box-shadow:none}
  .js .certs[open] .cert-list li{animation:rise var(--t-move) var(--ease) both}
  .js .certs[open] .cert-list li:nth-child(2){animation-delay:var(--t-step)}
  .js .certs[open] .cert-list li:nth-child(3){animation-delay:calc(var(--t-step) * 2)}
  .credentials{margin-top:28px}
}
/* The narrowest phones: the selector keeps its names and drops the small numbers. */
@media(max-width:359px){.step-tab b{display:none}.step-tab{font-size:14px}}
@media(prefers-reduced-motion:reduce){
  .steps-tabbed .step.is-current.is-in,.js .certs[open] .cert-list li,.js .certs.a-in .cert-chips i{animation:none}
  .step-tabs i,.step-tab,.step-tab b,.js .certs summary:after{transition:none}
  .story-p:nth-child(2):after{transition:none}
  .story-p:nth-child(2):is(.a-wait,.a-in,.a-lines,.gap-wait):after{transform:none}
}
