/* ROUND 14, STEP 2 · TABLET AND PHONE for the homepage draft (home.html = page-h2 on every screen).
   This file only adds rules under 1024 px. Above that the page is page-h2.html.
   Sizes that the scripts set (windows, rows, the last line) come from m-o.js, m-b.js, m-b7.js
   and sec-h.js. Two steps:
     tablet   640 to 1024 px: the desktop page, made to fit
     phone    under 640 px: its own composition. Every section stacks. One left edge. */

/* =====================================================================================
   TABLET AND PHONE
   ===================================================================================== */
/* 18 Nov 2026: from 1025 to about 1430 px the availability line, centred, ran under the links of the bar
   (46 px of overlap at 1280), and at 1440 it stood 9 px from "Work". Up to 1500 px it stands at the
   left, where the hidden wordmark leaves room, as it already did on a tablet. Above that it is centred. */
@media (max-width: 1500px) {
  .bar-open { left: var(--gut); transform: none; }
}
/* 18 Nov 2026: About has four facts (Tools is new). Four columns need a wide screen; below 1280 px they stand two by two. */
@media (max-width: 1279.98px) {
  .b7-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 18 Nov 2026: the line that says what the product is (.sb-what, the first of three at the right of a line of the index)
   needs a line of the index 70 px high. Below 980 px a line is lower (59 px at 820), and three lines ran into the next
   line of the index. There, and on a phone, the two lines stay as they were. */
@media (max-width: 979.98px) {
  .sb-what { display: none; }
  .sb-meta .sb-what + span { color: inherit; }
}
@media (max-width: 1024px) {
  /* The availability line stood in the middle of the bar, under the links. At the hero the
     wordmark is hidden, so the line takes its place at the left. */
  .bar-open { left: var(--gut); transform: none; }
  .bar-links { gap: clamp(0.6rem, 2vw, 1.5rem); }
  /* A finger needs 44 px: the wordmark, each link of the bar, each mark of the name. */
  .bar-brand { min-height: 44px; display: inline-flex; align-items: center; }
  .bar-links a { min-width: 44px; justify-content: center; }
  .o-dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); border-radius: 50%; }

  /* Graphic design: the longest name and its facts must fit one line. */
  .b7-row, .b7-btn { font-size: min(3.6vw, 7.7vh); }
  .b7-btn { min-height: 44px; }
  .b7-more { min-height: 48px; }

  /* The line that says what he is: 18 px, so the first screen says it clearly. */
  .o-line { font-size: 1.125rem; }
  .o-acts { flex: none; }
  .o-acts .btn { white-space: nowrap; }

  /* The index: a long name, the window and the credit must fit one line. */
  .sb-row { font-size: min(7.2vw, 14.4vh); }
  .sb-info { width: max(100%, 19rem); }

  /* The sheet of paper: a real margin of paper beside its text. */
  .e-sheet { margin-left: 12px; margin-right: 12px; padding-left: calc(var(--gut) - 12px); padding-right: calc(var(--gut) - 12px); }
  body.in-paper:not(.at-hero) .bar { border-width: 0 12px; padding: 0 calc(var(--gut) - 12px); }

  /* The bar is a flat band, so the text that passes under it does not show through its words. */
  body:not(.at-hero) .bar { background: var(--void); }
  body.at-paper:not(.at-hero):not(.in-paper) .bar { background: none; }
  body.in-paper:not(.at-hero) .bar { background: var(--bone); }

  /* how i work: three narrow columns hold more lines. */
  .hx2-three { min-height: 0; }
  .h2-left .e-avail { max-width: 17em; }
}

/* A narrow tablet: the availability line takes two rows, so it stays clear of the five links. */
@media (max-width: 900px) {
  .bar-open { max-width: 11.5em; white-space: normal; line-height: 1.25; }
}

/* A finger has no hover: the button of the open line is always there. */
@media (hover: none) {
  .sb-row:hover .sb-meta b { background: var(--bone); }
}

/* =====================================================================================
   PHONE
   ===================================================================================== */
@media (max-width: 639.98px) {
  /* ---------- the bar: the wordmark, the resume, the way to write ---------- */
  .bar { height: 64px; }
  .bar-links { gap: 1.25rem; }
  .bar-links a:not(.bar-mail):not([href$=".pdf"]) { display: none; }
  .bar-open { height: 64px; }

  /* ---------- hero: the name on two lines ---------- */
  .hero { height: 100svh; min-height: 560px; }
  .hero.is-two .o-name { top: 41%; font-size: min(13.2vw, 10.5vh); line-height: 1; }
  .o-label { white-space: normal; width: calc(100vw - 2 * var(--gut)); }
  .o-label b { font-size: 1.25rem; }
  .o-label span { font-size: 0.9375rem; line-height: 1.35; text-wrap: balance; }
  .o-foot { flex-direction: column; align-items: flex-start; gap: 0.9rem; bottom: 1.3rem; }
  .o-line { max-width: 19em; }

  /* ---------- the index: the open line stacks ---------- */
  .sb-work { padding-top: 4.5rem; }
  .sb-row { position: relative; display: block; font-size: 9.6vw; overflow: hidden; }
  .sb-row .sb-o { position: absolute; left: 0; top: 0; margin-top: 0; will-change: transform; }
  .sb-text { width: max-content; max-width: 100%; }
  .sb-info { left: 0; width: calc(100vw - 2 * var(--gut)); padding-top: 0.5rem; }
  .sb-claim { font-size: 1.3125rem; line-height: 1.2; }
  .sb-meta { position: absolute; left: 0; margin: 0; padding: 0; align-items: flex-start; text-align: left; white-space: normal; font-size: 1.0625rem; }
  .sb-meta b { margin-top: 0.8rem; min-height: 44px; display: inline-flex; align-items: center; padding: 0 1.2rem; }

  /* ---------- about: the role, the portrait, the text, the facts ---------- */
  .p-b7 .r9 section { padding-top: 5.5rem; }
  .b7-me { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .b7-body { display: contents; }
  .b7-say { order: 1; }
  .b7-win { order: 2; }
  .b7-how { order: 3; margin-top: 0; font-size: 1.25rem; max-width: none; }
  .b7-facts { order: 4; margin-top: 0.3rem; grid-template-columns: 1fr; gap: 0.85rem; }
  .b7-facts div { display: grid; grid-template-columns: 7.4em 1fr; column-gap: 1rem; }
  .b7-facts dt { margin: 0; font-size: 1.0625rem; }
  .b7-facts dd { font-size: 1.0625rem; }
  .b7-acts { order: 5; margin-top: 0.6rem; }
  .b7-role { font-size: 11.2vw; white-space: normal; }
  .b7-bg { font-size: 1.5rem; line-height: 1.14; text-wrap: pretty; }

  /* ---------- graphic design: the open line stacks ---------- */
  .b7-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .b7-row, .b7-btn { font-size: 5.6vw; }
  .b7-row { position: relative; display: block; }
  .b7-row .b7-slot { position: absolute; left: 0; top: 0; will-change: transform; }
  .b7-text { width: max-content; max-width: 100%; }
  .b7-info { left: 0; width: calc(100vw - 2 * var(--gut)); max-width: none; padding-top: 0.45rem; font-size: 1.0625rem; }
  .b7-row .b7-meta { position: absolute; left: 0; margin: 0; padding: 0; align-items: flex-start; text-align: left; white-space: normal; font-size: 1.0625rem; }
  .b7-row .b7-meta b { margin-top: 0.2rem; min-height: 44px; display: inline-flex; align-items: center; }
  .b7-more { flex-wrap: wrap; min-height: 0; margin-top: 0.4rem; }
  .b7-btn { min-height: 48px; }
  .b7-mmeta { width: 100%; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-start; gap: 0 1.2rem; font-size: 1.0625rem; }
  .b7-mmeta .link { min-height: 44px; }

  /* ---------- how i work: three words, one under the other ---------- */
  .hx { padding-top: 5.5rem; }
  .hx2-cases { gap: 0.3rem; margin-left: 0; }
  .hx2-case { min-height: 44px; padding: 0 0.66rem; font-size: 1.0625rem; letter-spacing: -0.035em; }
  .hx2-three { margin-top: 1.9rem; grid-template-columns: 1fr; row-gap: 1.9rem; }
  .hx2-word { font-size: 15.4vw; }
  .hx2-three dd { margin-top: 0.7rem; }
  .hx2-say { font-size: 1.25rem; max-width: none; }

  /* ---------- the sheet: status, the red button, the links ---------- */
  .h .e-sheet { margin: 4.5rem 8px 0; padding: 2.6rem 16px 0; border-radius: 22px; --air: 2.6rem; }
  body.in-paper:not(.at-hero) .bar { border-width: 0 8px; padding: 0 16px; }
  .h2-grid { grid-template-columns: 1fr; row-gap: 1.7rem; }
  .h2-left .e-avail { max-width: none; margin-top: 0.9rem; }
  .h2-right { align-items: stretch; }
  .h2-pill { justify-content: center; padding: 1.05rem 0.9rem 1.15rem; }
  .h2-pill span { display: none; }
  .h2-pill b { font-size: min(5.9vw, 1.7rem); }
  .h2-right .e-acts { margin-top: 0.5rem; padding-right: 0; }

  /* The line on three rows. The rows stand close, like the lines of the name in the hero. */
  .f-line.is-rows .f-row { line-height: 0.9; }
  .h-foot { margin-bottom: 0.7rem; }
}
