/* Five Loaves help. Uses the app's colour tokens from styles.css, with fallbacks.
   Large type and large targets: the people reading this are often in their 80s. */

/* The round "? Help" button in the top bar */
.mmh-open {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 16px 0 8px;
  margin-left: auto;
  border: 2px solid var(--navy, #36435D); border-radius: 999px;
  background: var(--paper, #fff); color: var(--navy, #36435D);
  font: inherit; font-size: 18px; font-weight: 700;
  cursor: pointer; flex: 0 0 auto;
}
.mmh-open:active { transform: scale(0.98); }
.mmh-q {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy, #36435D); color: var(--on-navy, #fff);
  font-size: 22px; font-weight: 800; line-height: 1;
}

/* Button lookalike used inside the words */
.mmh-btn {
  display: inline-block;
  padding: 1px 12px; margin: 2px 0;
  border-radius: 10px;
  background: var(--navy, #36435D); color: var(--on-navy, #fff);
  font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.mmh-btn-small { font-size: 0.9em; padding: 0 10px; }
.mmh-place { font-weight: 700; color: var(--ink, #1F2635); }

/* The Help screen list */
.mmh-list { display: flex; flex-direction: column; gap: 14px; }
.mmh-lead { margin: 0; font-size: 20px; }
.mmh-search-label { margin: 6px 0 -6px; }
.mmh-search {
  width: 100%; min-height: 58px; padding: 0 16px;
  border: 2px solid var(--line, #D2D6DD); border-radius: 12px;
  background: var(--paper, #fff); color: var(--ink, #1F2635);
  font: inherit; font-size: 20px;
}
.mmh-search:focus { border-color: var(--navy, #36435D); outline: none; }
.mmh-none { margin: 0; color: var(--muted, #5A6272); }
.mmh-group { display: flex; flex-direction: column; gap: 10px; }
.mmh-group h2, .mmh-more h2, .mmh-tips h2 {
  margin: 14px 0 2px; font-size: 17px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted, #5A6272);
}
.mmh-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 68px; padding: 10px 18px;
  border: 2px solid var(--line, #D2D6DD); border-radius: 16px;
  background: var(--paper, #fff); color: var(--ink, #1F2635);
  font: inherit; font-size: 20px; font-weight: 700; text-align: left;
  cursor: pointer;
}
.mmh-item svg { flex: 0 0 auto; color: var(--navy, #36435D); }
.mmh-item:active { transform: scale(0.99); }
.mmh-item[hidden], .mmh-group[hidden] { display: none; }
.mmh-foot { margin: 8px 0 0; color: var(--muted, #5A6272); }

/* The help panel */
html.mmh-locked, html.mmh-locked body { overflow: hidden; }
.mmh-dialog {
  width: 100%; max-width: 720px; height: 100%; max-height: 100%;
  margin: 0 auto; padding: 0;
  border: 0; border-radius: 0;
  background: var(--bg, #F2F3F5); color: var(--ink, #1F2635);
  font-family: var(--sans, Inter, system-ui, sans-serif);
  overflow-y: auto; overscroll-behavior: contain;
}
.mmh-dialog[open] { display: block; }
.mmh-dialog::backdrop { background: rgba(16, 20, 29, 0.55); }
@media (min-width: 760px) {
  .mmh-dialog { height: auto; max-height: calc(100% - 64px); margin-top: 32px; border-radius: 20px; }
}
.mmh-bar {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: var(--bg, #F2F3F5); border-bottom: 1px solid var(--line, #D2D6DD);
}
.mmh-close, .mmh-back, .mmh-read, .mmh-all {
  min-height: 52px; padding: 0 20px;
  border-radius: 14px; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer;
}
.mmh-close { border: 0; background: var(--navy, #36435D); color: var(--on-navy, #fff); }
.mmh-back, .mmh-read, .mmh-all { border: 2px solid var(--navy, #36435D); background: transparent; color: var(--navy, #36435D); }
.mmh-guide { padding: 8px 18px max(32px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; font-size: 21px; line-height: 1.5; }
.mmh-kicker { margin: 8px 0 -10px; color: var(--muted, #5A6272); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.mmh-guide h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; outline: none; }
.mmh-intro { margin: 0; color: var(--ink, #1F2635); }
.mmh-read { align-self: flex-start; }

.mmh-steps { list-style: none; counter-reset: mmh; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mmh-steps li {
  counter-increment: mmh;
  position: relative;
  padding: 16px 18px 16px 72px; min-height: 76px;
  background: var(--paper, #fff); border: 1px solid var(--line, #D2D6DD); border-radius: 16px;
}
.mmh-steps li::before {
  content: counter(mmh);
  position: absolute; left: 16px; top: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold, #F4C452); color: #1F2635;
  font-weight: 800; font-size: 22px;
}
.mmh-note { margin: 8px 0 0; color: var(--muted, #5A6272); font-size: 19px; }

.mmh-tips { background: var(--soft, #E9ECF1); border-radius: 16px; padding: 4px 18px 14px; }
.mmh-tips ul { margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

.mmh-terms { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mmh-terms div { background: var(--paper, #fff); border: 1px solid var(--line, #D2D6DD); border-radius: 14px; padding: 12px 16px; }
.mmh-terms dt { font-weight: 800; }
.mmh-terms dd { margin: 2px 0 0; }

.mmh-more { display: flex; flex-direction: column; gap: 10px; }
.mmh-all { width: 100%; }
.mmh-close-bottom { width: 100%; margin-top: 4px; }
