/* =============================================================
   VEEDAY CONSULTANTS — m-requirement.css  (round 11, phones only)
   requirement.html. Loaded after mobile.css. Pairs with js/m-requirement.js.
   Everything is inside the phone query. The step flow is scoped to html.m-rq, which only
   the script sets, so with JS off the phone gets the normal single-page form.
   ============================================================= */

@media (max-width: 700px), (hover: none) and (pointer: coarse) and (max-height: 500px) {

  /* ═════════ STEP FLOW ═════════ */
  html.m-rq #clientForm .form-section:not(.mrq-on) { display: none; }
  html.m-rq #clientForm .form-section { margin-bottom: 0; padding-bottom: 6px; border-bottom: 0; }
  html.m-rq #clientForm { padding-top: 18px; }
  html.m-rq .rq-shell .form-section__title { scroll-margin-top: calc(var(--nav-h) + 90px); }
  html.m-rq .form-section__title:focus { outline: none; }
  html.m-rq .form-section__title:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

  /* consent, submit and note belong to the review step; the bar carries the submit */
  html.m-rq #clientForm:not(.mrq-review-on) .form-consent,
  html.m-rq #clientForm:not(.mrq-review-on) .form-note,
  html.m-rq #clientForm .form-submit { display: none; }
  html.m-rq #clientForm .mrq-review { display: none; }
  html.m-rq #clientForm.mrq-review-on .mrq-review { display: block; }
  html.m-rq #clientForm.mrq-review-on .form-consent { margin-top: 22px; margin-bottom: 0; }
  html.m-rq #clientForm.mrq-review-on .form-note { margin-top: 16px; }

  /* step entrance: a short slide in the direction of travel */
  .mrq-in-fwd { animation: mrqInFwd .42s var(--ease) both; }
  .mrq-in-back { animation: mrqInBack .42s var(--ease) both; }
  @keyframes mrqInFwd { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
  @keyframes mrqInBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

  /* ── segmented progress at the top of the card ── */
  .mrq-head { padding: 14px 16px 0; }
  .mrq-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .mrq-seg__item {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 9px;
    min-height: 48px; padding: 8px 0 4px;
    font-size: 13px; font-weight: 500; line-height: 1.2; letter-spacing: 0; color: var(--mute);
    text-align: left; transition: color .3s;
  }
  .mrq-seg__item i {
    display: block; height: 3px; border-radius: 3px; background: rgba(17, 17, 17, .12);
    position: relative; overflow: hidden;
  }
  .mrq-seg__item i::after {
    content: ''; position: absolute; inset: 0; background: var(--red); border-radius: inherit;
    transform: scaleX(0); transform-origin: 0 50%; transition: transform .55s var(--ease);
  }
  .mrq-seg__item.is-done i::after, .mrq-seg__item.is-current i::after { transform: scaleX(1); }
  .mrq-seg__item.is-current i::after { background: var(--ink); }
  .mrq-seg__item.is-done { color: var(--ink); }
  .mrq-seg__item.is-current { color: var(--ink); font-weight: 600; }
  .mrq-seg__item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mrq-seg__item:focus-visible { outline-offset: 2px; }
  .mrq-head__status {
    margin-top: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
    font-size: 13px; line-height: 1.5; color: var(--mute);
  }

  /* ── review: the brief, as an ink card ── */
  .mrq-review__title { margin-bottom: 18px; }
  .mrq-brief {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 20px 18px 6px; border-radius: 8px;
    color: var(--paper);
    background:
      radial-gradient(90% 60% at 100% 0%, #55120d 0%, rgba(74, 15, 11, .42) 42%, rgba(18, 16, 15, 0) 78%),
      linear-gradient(165deg, #171413 0%, #120f0f 60%, #1c0c0b 100%);
    box-shadow: 0 26px 50px -34px rgba(18, 16, 15, .75);
  }
  .mrq-brief__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .mrq-brief__label { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #F0554E; }
  .mrq-brief__tag { min-width: 0; font-size: 13px; color: rgba(250, 250, 248, .66); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mrq-brief__count {
    display: flex; align-items: baseline; gap: 10px; margin-top: 6px; min-height: 48px;
    font-family: var(--serif); font-size: 42px; line-height: 1.1; letter-spacing: -.02em;
    font-variant-numeric: lining-nums tabular-nums; color: var(--paper);
  }
  .mrq-brief__count small { font-family: var(--sans); font-size: 14px; letter-spacing: 0; color: rgba(250, 250, 248, .66); }
  .mrq-brief__count.is-empty { font-size: 21px; letter-spacing: -.005em; align-items: center; color: rgba(250, 250, 248, .8); }

  .mrq-group { margin-top: 14px; border-top: 1px solid rgba(250, 250, 248, .14); }
  .mrq-group__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
  .mrq-group__head h3 { font-family: var(--serif); font-size: 18px; font-weight: 400; line-height: 1.25; letter-spacing: -.005em; color: var(--paper); }
  .mrq-group__edit {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: flex-end; padding: 0 2px;
    font-size: 14px; font-weight: 500; color: #F0554E;
    text-decoration: underline; text-decoration-color: rgba(240, 85, 78, .45); text-underline-offset: 4px;
  }
  .mrq-group__edit:active { opacity: .6; }
  .mrq-group dl { padding-bottom: 10px; }
  .mrq-group dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 0; }
  .mrq-group dt { flex: none; font-size: 13px; color: rgba(250, 250, 248, .58); }
  .mrq-group dd {
    min-width: 0; max-width: 66%; font-size: 15px; line-height: 1.45; color: var(--paper); text-align: right;
    overflow-wrap: anywhere; white-space: pre-line;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
  }
  .mrq-group dl > div.is-long { display: block; }
  .mrq-group dl > div.is-long dt { margin-bottom: 3px; }
  .mrq-group dl > div.is-long dd { max-width: none; text-align: left; }
  .mrq-group dd.is-empty { color: rgba(250, 250, 248, .36); }
  .mrq-review__talk { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--mute); text-align: center; }
  .mrq-review__talk a { display: inline-block; padding: 12px 0; color: var(--ink); }

  /* ── bottom action bar: takes the dock's place while the form is on screen ── */
  .mrq-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
    display: flex; align-items: center; gap: 10px;
    padding: 10px max(var(--pad), env(safe-area-inset-right, 0px)) calc(10px + var(--m-safe-b)) max(var(--pad), env(safe-area-inset-left, 0px));
    background: var(--paper); color: var(--ink);
    border-top: 1px solid rgba(17, 17, 17, .12);
    box-shadow: 0 -14px 30px -24px rgba(18, 16, 15, .4);
    transform: translateY(calc(100% + 4px)); visibility: hidden;
    transition: transform .42s var(--ease), visibility 0s .42s;
  }
  html.mrq-bar-on .mrq-bar {
    transform: translateY(calc(-1 * var(--mrq-kb, 0px))); visibility: visible;
    transition: transform .42s var(--ease), visibility 0s;
  }
  /* above the keyboard it follows the keyboard directly */
  html.mrq-bar-on.m-kb-open .mrq-bar { transition: transform .12s linear, visibility 0s; padding-bottom: 10px; }
  html.mrq-bar-on .m-dock { transform: translateY(calc(100% + 2px)); visibility: hidden; transition: transform .42s var(--ease), visibility 0s .42s; }
  /* the toast sits above the bar instead of the hidden dock */
  html.mrq-bar-on .m-toast { bottom: calc(76px + var(--m-safe-b)); }

  .mrq-bar__meter { position: absolute; left: 0; right: 0; top: -1px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; height: 2px; }
  .mrq-bar__meter i { background: transparent; transition: background-color .45s var(--ease); }
  .mrq-bar__meter i.is-on { background: var(--red); }

  .mrq-bar__back {
    position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%;
    border: 1px solid rgba(17, 17, 17, .22); background: var(--paper);
    transition: transform .2s ease, background-color .2s;
  }
  .mrq-bar__back[hidden] { display: none; }
  .mrq-bar__back::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -2px;
    border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg);
  }
  .mrq-bar__back:active { transform: scale(.94); background: rgba(17, 17, 17, .05); }
  .mrq-bar__next { flex: 1; justify-content: center; min-height: 52px; font-size: 16px; font-weight: 600; }
  .mrq-bar__next:disabled { opacity: .6; }
  .mrq-bar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* landscape phones: a slimmer bar */
  @media (max-height: 500px) {
    .mrq-bar { padding-top: 7px; padding-bottom: calc(7px + var(--m-safe-b)); }
    .mrq-bar__back { width: 46px; height: 46px; }
    .mrq-bar__next { min-height: 46px; }
    html.mrq-bar-on .m-toast { bottom: calc(64px + var(--m-safe-b)); }
  }

  /* ═════════ "WHAT YOU CAN ASK US FOR" AS A RAIL OF CARDS ═════════ */
  .rq-scope__list.m-rail { --m-rail-w: 80%; border-top: 0; padding-block: 2px 4px; }
  .rq-scope__list.m-rail > div {
    display: flex; flex-direction: column; justify-content: flex-start; gap: 16px;
    padding: 22px 20px 26px;
    background: var(--sand); border: 1px solid var(--line); border-radius: 8px;
  }
  .rq-scope__list.m-rail > div::after { display: none; }
  .rq-scope__list.m-rail dt {
    display: flex; align-items: center; gap: 12px; padding-top: 0;
    font-size: 13px; letter-spacing: .14em;
  }
  .rq-scope__list.m-rail dt::before { content: ''; flex: none; width: 22px; height: 1px; background: var(--red); }
  .rq-scope__list.m-rail dd { font-size: 21px; line-height: 1.38; }
  .rq-scope__grid > .m-dots { margin-top: calc(14px - clamp(32px, 5vw, 88px)); }

  @media (prefers-reduced-motion: reduce) {
    .mrq-in-fwd, .mrq-in-back { animation: none; }
    .mrq-bar, html.mrq-bar-on .mrq-bar, html.mrq-bar-on .m-dock,
    .mrq-seg__item i::after, .mrq-bar__meter i { transition: none !important; }
  }
}
