.aero-tool-help-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--tool-muted, #65708e);
  background: transparent;
  border: 1px solid var(--tool-line, #d7dfed);
  border-radius: 10px;
  font: 700 11px Inter, "Open Sans", sans-serif;
  cursor: pointer;
}
/* Only with a real pointer: after a tap of a finger or the pencil iOS keeps :hover, and
   closing the help gives the focus back to the button, which stayed lit. */
@media (hover: hover) {
  .aero-tool-help-button:hover {
    color: var(--tool-accent, #344290);
    background: var(--tool-accent-soft, #e9edf9);
  }
}
.aero-tool-help-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aero-tool-help-dialog {
  --help-surface: var(--tool-surface, #fff);
  --help-page: var(--tool-page, #f4f6fb);
  --help-text: var(--tool-text, #1e2848);
  --help-muted: var(--tool-muted, #65708e);
  --help-line: var(--tool-line, #d7dfed);
  --help-accent: var(--tool-accent, #344290);
  --help-tint: var(--tool-accent-soft, #e9edf9);
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(800px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--help-text);
  background: var(--help-surface);
  border: 1px solid var(--help-line);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(9, 15, 36, .34);
  font-family: Inter, "Open Sans", sans-serif;
}
.aero-tool-help-dialog[open] { display: flex; flex-direction: column; }
.aero-tool-help-dialog::backdrop {
  background: rgba(8, 13, 29, .62);
  backdrop-filter: blur(3px);
}
.aero-tool-help-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--help-line);
}
.aero-tool-help-heading { min-width: 0; flex: 1 1 auto; }
.aero-tool-help-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--help-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}
.aero-tool-help-heading h2 { margin: 0; color: var(--help-text); font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.aero-tool-help-heading p { margin: 8px 0 0; color: var(--help-muted); font-size: 13px; line-height: 1.55; }
.aero-tool-help-close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--help-muted);
  background: transparent;
  border: 1px solid var(--help-line);
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.aero-tool-help-close:hover { color: var(--help-accent); background: var(--help-tint); }
.aero-tool-help-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 24px 24px;
}
.aero-tool-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.aero-tool-help-card {
  min-width: 0;
  padding: 16px;
  background: color-mix(in srgb, var(--help-page) 72%, var(--help-surface));
  border: 1px solid var(--help-line);
  border-radius: 14px;
}
.aero-tool-help-card-wide { grid-column: 1 / -1; }
.aero-tool-help-card h3 { margin: 0 0 10px; color: var(--help-text); font-size: 13px; }
.aero-tool-help-card ul { margin: 0; padding-left: 18px; color: var(--help-muted); font-size: 12px; line-height: 1.55; }
.aero-tool-help-card li + li { margin-top: 6px; }
.aero-tool-help-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin: 0; }
.aero-tool-help-keys > div { min-width: 0; display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr); align-items: center; gap: 9px; }
.aero-tool-help-keys dt, .aero-tool-help-keys dd { margin: 0; }
.aero-tool-help-keys dt { white-space: nowrap; }
.aero-tool-help-keys dd { color: var(--help-muted); font-size: 11px; line-height: 1.4; }
.aero-tool-help-dialog kbd {
  display: inline-block;
  min-width: 23px;
  margin: 1px;
  padding: 3px 6px;
  color: var(--help-text);
  background: var(--help-surface);
  border: 1px solid var(--help-line);
  border-bottom-width: 2px;
  border-radius: 5px;
  box-shadow: none;
  font: 700 10px Inter, sans-serif;
  text-align: center;
}
.aero-tool-help-panel-note { margin: 0; color: var(--help-muted); font-size: 12px; line-height: 1.55; }
/* The app and its stores, from aero-tool-app.js (website only). */
.aero-tool-help-app { display: flex; align-items: flex-start; gap: 14px; }
.aero-tool-help-app img { flex: 0 0 48px; border-radius: 11px; }
.aero-tool-help-app h3 { margin-bottom: 4px; }
.aero-tool-help-app p { margin: 0 0 10px; color: var(--help-muted); font-size: 12px; line-height: 1.55; }
.aero-tool-help-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.aero-tool-help-store {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--tool-accent-fill, #263676);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.aero-tool-help-store:hover { text-decoration: underline; text-underline-offset: 3px; }
.aero-tool-help-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
/* Terms of use and contact, from aero-tool-shell.js. */
.aero-tool-help-notice { flex: 1 0 100%; padding-top: 12px; color: var(--help-muted); border-top: 1px solid var(--help-line); font-size: 11px; line-height: 1.5; }
.aero-tool-help-notice p { margin: 0 0 4px; }
.aero-tool-help-notice a { color: var(--help-accent); font-weight: 700; }
.aero-tool-help-manual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--help-accent);
  background: var(--help-tint);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}
.aero-tool-help-manual:hover { text-decoration: underline; text-underline-offset: 3px; }
.aero-tool-help-footer small { max-width: 290px; color: var(--help-muted); font-size: 10px; line-height: 1.4; text-align: right; }

/* Tool guide: written in the page HTML for search engines; aero-tool-help.js moves it
   here. Until then it stays out of sight without leaving the accessibility tree. */
.aero-tool-guide:not(.is-ready) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.aero-tool-guide {
  margin-top: 22px;
  padding-top: 20px;
  color: var(--help-muted);
  border-top: 1px solid var(--help-line);
  font-size: 13px;
  line-height: 1.6;
  scroll-margin-top: 12px;
}
/* Heading levels differ per page (CR3 has no other h1), so sizes go by role. */
.aero-tool-guide :is(h1, h2, h3, h4) { margin: 20px 0 6px; color: var(--help-text); font-size: 14px; line-height: 1.3; }
.aero-tool-guide .aero-tool-guide-title { margin: 0 0 10px; font-size: 19px; line-height: 1.25; }
.aero-tool-guide p, .aero-tool-guide ul, .aero-tool-guide ol, .aero-tool-guide table { margin: 0 0 10px; }
.aero-tool-guide ul, .aero-tool-guide ol { padding-left: 20px; }
.aero-tool-guide li + li { margin-top: 5px; }
.aero-tool-guide strong { color: var(--help-text); }
.aero-tool-guide a { color: var(--help-accent); font-weight: 700; }
.aero-tool-guide table { width: 100%; border-collapse: collapse; font-size: 12px; }
.aero-tool-guide th, .aero-tool-guide td { padding: 7px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--help-line); }
.aero-tool-guide th { color: var(--help-text); }
.aero-tool-guide-faq > :is(h3, h4):not(:first-child) { margin: 12px 0 3px; font-size: 13px; }
.aero-tool-guide-faq p { margin: 0; }
.aero-tool-help-dialog button:focus-visible,
.aero-tool-help-dialog a:focus-visible,
.aero-tool-help-button:focus-visible { outline: 3px solid #d88435; outline-offset: 3px; }

/* Touch screens without a mouse or trackpad: no mouse section, and the touch one takes
   the whole row. On a phone the keyboard shortcuts go too; a tablet may have a keyboard. */
@media not (any-pointer: fine) {
  .aero-tool-help-card[data-help-input="mouse"] { display: none; }
  .aero-tool-help-card[data-help-input="touch"] { grid-column: 1 / -1; }
}
@media (max-width: 620px) and (not (any-pointer: fine)) {
  .aero-tool-help-card[data-help-input="keyboard"] { display: none; }
}

@media (max-width: 900px), (max-height: 560px) {
  .aero-tool-help-button { width: 38px; min-height: 38px; padding: 0; border-radius: 50%; }
  .aero-tool-help-button span { display: none; }
}

@media (max-width: 620px) {
  .aero-tool-help-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto auto 8px;
    border-radius: 18px 18px 14px 14px;
  }
  .aero-tool-help-header { padding: 18px 18px 14px; }
  .aero-tool-help-heading h2 { font-size: 23px; }
  .aero-tool-help-heading p { font-size: 12px; }
  .aero-tool-help-content { padding: 14px 14px max(18px, env(safe-area-inset-bottom)); }
  .aero-tool-help-grid { grid-template-columns: 1fr; gap: 10px; }
  .aero-tool-help-card-wide { grid-column: auto; }
  .aero-tool-help-keys { grid-template-columns: 1fr; }
  .aero-tool-help-footer { align-items: stretch; flex-direction: column; }
  .aero-tool-help-manual { justify-content: center; }
  .aero-tool-help-footer small { max-width: none; text-align: left; }
  .aero-tool-guide .aero-tool-guide-title { font-size: 17px; }
}

/* Banner of the app on phones and tablets, from aero-tool-app.js (website only). It floats
   over the bottom of the tool and goes with its cross (this visit) or for good. */
.aero-app-banner {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 90;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 4px 12px;
  padding: 12px;
  color: var(--tool-text, #1e2848);
  background: var(--tool-surface, #fff);
  border: 1px solid var(--tool-line, #d7dfed);
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(9, 15, 36, .3);
  font-family: Inter, "Open Sans", sans-serif;
}
.aero-app-banner img { border-radius: 10px; }
.aero-app-banner-text { min-width: 0; display: grid; gap: 2px; }
.aero-app-banner-text strong { font-size: 14px; }
.aero-app-banner-text span { color: var(--tool-muted, #65708e); font-size: 12px; line-height: 1.35; }
.aero-app-banner-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  align-self: start;
  padding: 0;
  color: var(--tool-muted, #65708e);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.aero-app-banner-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.aero-app-banner-actions > * {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 9px;
  font: 750 13px Inter, "Open Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.aero-app-banner-never { color: var(--tool-muted, #65708e); background: transparent; border: 1px solid var(--tool-line, #d7dfed); }
.aero-app-banner-install { color: #fff; background: var(--tool-accent-fill, #263676); }
.aero-app-banner :is(a, button):focus-visible { outline: 3px solid #d88435; outline-offset: 2px; }
