/* ============================================================
   help.html — help centre layout
   Built on the shared tokens (assets/css/tokens.css) so it follows
   the theme, including dark mode. No rule here targets page classes
   that already exist elsewhere.
   ============================================================ */

.help-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- hero ------------------------------------------------------------- */
.help-hero {
  background:
    radial-gradient(120% 160% at 8% 0%, rgba(255, 127, 17, 0.22) 0%, transparent 55%),
    linear-gradient(135deg, var(--brand-navy-900, #08283c) 0%, var(--brand-navy-700, #0b3c5d) 100%);
  color: #ffffff;
  padding: clamp(32px, 6vw, 72px) 0 clamp(36px, 6vw, 64px);
}

.help-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-orange-300, #ffc48a);
  margin-bottom: 10px;
}

.help-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  color: #ffffff;
}

.help-hero-text {
  margin: 0 0 22px;
  max-width: 62ch;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.help-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- sections --------------------------------------------------------- */
.help-section {
  padding: clamp(32px, 5vw, 56px) 0;
  background: var(--color-background, #f7f8fa);
}

.help-section--alt {
  background: var(--color-surface, #ffffff);
  border-top: 1px solid var(--line, #e4e6ea);
  border-bottom: 1px solid var(--line, #e4e6ea);
}

.help-section h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.help-lede {
  margin: 0 0 22px;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted, #52606d);
}

.help-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--brand-orange-200, #ffe0bd);
  background: var(--brand-orange-100, #fff6ec);
  color: #6b3d08;
  font-size: 14px;
  line-height: 1.5;
}

.help-note a {
  color: inherit;
  font-weight: 600;
}

/* --- grids and cards -------------------------------------------------- */
.help-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}

.help-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.help-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line, #e4e6ea);
  border-radius: var(--radius-lg, 14px);
  background: var(--color-surface, #ffffff);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(9, 13, 20, 0.06));
}

.help-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #0f172a);
}

.help-card p {
  margin: 0 0 auto;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted, #52606d);
}

.help-badge {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(11, 60, 93, 0.08);
  color: var(--brand-navy-700, #0b3c5d);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.help-panel {
  padding: 20px;
  border: 1px solid var(--line, #e4e6ea);
  border-radius: var(--radius-lg, 14px);
  background: var(--color-surface, #ffffff);
}

.help-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink, #0f172a);
}

.help-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted, #52606d);
}

.help-steps li + li {
  margin-top: 6px;
}

.help-steps strong {
  color: var(--ink, #0f172a);
}

.help-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy-700, #0b3c5d);
  text-decoration: underline;
}

/* --- buttons ---------------------------------------------------------- */
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--line, #e4e6ea);
  background: var(--color-surface, #ffffff);
  color: var(--ink, #0f172a);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.help-btn:hover {
  border-color: var(--brand-navy-500, #1c5c86);
}

.help-btn:focus-visible {
  outline: 2px solid var(--color-ring, #ff8a1f);
  outline-offset: 2px;
}

.help-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.help-btn--primary {
  background: var(--brand-navy-700, #0b3c5d);
  border-color: var(--brand-navy-700, #0b3c5d);
  color: #ffffff;
}

.help-btn--primary:hover {
  background: var(--brand-navy-600, #0f4b74);
  border-color: var(--brand-navy-600, #0f4b74);
}

.help-btn--ghost {
  background: transparent;
}

.help-hero .help-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.help-hero .help-btn--primary {
  background: var(--brand-orange-500, #ff7f11);
  border-color: var(--brand-orange-500, #ff7f11);
  color: #21160a;
}

.help-hero .help-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.help-hero .help-btn--primary:hover {
  background: var(--brand-orange-400, #ff8a1f);
}

.help-card .help-btn {
  align-self: flex-start;
  margin-top: 6px;
  width: auto;
}

/* --- FAQ -------------------------------------------------------------- */
.help-faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.help-faq-item {
  border: 1px solid var(--line, #e4e6ea);
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface, #ffffff);
  padding: 0 16px;
}

.help-faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #0f172a);
  list-style: none;
}

.help-faq-item summary::-webkit-details-marker {
  display: none;
}

.help-faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 600;
  color: var(--muted, #52606d);
}

.help-faq-item[open] summary::after {
  content: "\2212";
}

.help-faq-item p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted, #52606d);
}

/* --- contact band ----------------------------------------------------- */
.help-section--contact {
  background: var(--brand-navy-700, #0b3c5d);
  color: #ffffff;
}

.help-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.help-contact h2 {
  color: #ffffff;
}

.help-contact p {
  margin: 6px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.help-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-section--contact .help-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #ffffff;
}

.help-section--contact .help-btn--primary {
  background: var(--brand-orange-500, #ff7f11);
  border-color: var(--brand-orange-500, #ff7f11);
  color: #21160a;
}

/* --- dark mode -------------------------------------------------------- */
[data-theme="dark"] .help-section {
  background: #0a1622;
}

[data-theme="dark"] .help-section--alt {
  background: #0c1d2e;
  border-color: #1e3a52;
}

[data-theme="dark"] .help-section h2,
[data-theme="dark"] .help-card h3,
[data-theme="dark"] .help-panel h3,
[data-theme="dark"] .help-faq-item summary,
[data-theme="dark"] .help-steps strong,
[data-theme="dark"] .help-btn {
  color: #e7eef7;
}

[data-theme="dark"] .help-lede,
[data-theme="dark"] .help-card p,
[data-theme="dark"] .help-steps,
[data-theme="dark"] .help-faq-item p {
  color: #9fb3c8;
}

[data-theme="dark"] .help-card,
[data-theme="dark"] .help-panel,
[data-theme="dark"] .help-faq-item,
[data-theme="dark"] .help-btn {
  background: #0c1d2e;
  border-color: #1e3a52;
}

[data-theme="dark"] .help-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #cfe1f2;
}

[data-theme="dark"] .help-note {
  background: rgba(255, 127, 17, 0.14);
  border-color: rgba(255, 127, 17, 0.4);
  color: #ffd9b3;
}

[data-theme="dark"] .help-link {
  color: #9fc7e8;
}

/* --- how-to tutorials ------------------------------------------------- */

.help-section--howto {
  background: var(--color-surface, #ffffff);
  border-top: 1px solid var(--line, #e4e6ea);
}

/* The tutorials are a bento, so this one section is allowed to run wider than
   the reading column the rest of the help page keeps. */
.help-section--howto .help-shell {
  max-width: 1360px;
  padding-inline: clamp(16px, 3vw, 32px);
}

/* Bento grid: one large "start here" tile (8 cols), a partner tile (4), then
   two rows of three equal thirds. Tiles stretch to the tallest card in their
   row, which is what makes the composition read as a grid rather than a
   stack of cards. */
.help-tutorials {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.help-tutorial {
  grid-column: span 4;
  min-width: 0;
}

.help-tutorial--hero { grid-column: span 8; }
.help-tutorial--side { grid-column: span 4; }
.help-tutorial--third { grid-column: span 4; }

/* The hero tile has room for two columns of steps; the wide tile beside it
   keeps a single column so the pair balances. */
@media (min-width: 1180px) {
  .help-tutorial--hero .help-howto {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
  }

  .help-tutorial--hero .help-howto li {
    padding-left: 40px;
  }
}

/* The entry tile gets a slightly warmer surface so the eye lands on it first;
   the palette still comes from the theme tokens. */
.help-tutorial--hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 127, 17, 0.1), transparent 55%),
    var(--color-background, #f7f8fa);
  border-color: rgba(255, 127, 17, 0.28);
}

[data-theme="dark"] .help-tutorial--hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 127, 17, 0.16), transparent 55%),
    #0a1622;
  border-color: rgba(255, 180, 99, 0.32);
}

.help-tutorial {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 1.7vw, 26px);
  border: 1px solid var(--line, #e4e6ea);
  border-radius: var(--radius-lg, 14px);
  background: var(--color-background, #f7f8fa);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(9, 13, 20, 0.06));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.help-tutorial:hover {
  transform: translateY(-2px);
  border-color: var(--brand-navy-300, #7fb0e0);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(1, 42, 70, 0.12));
}

.help-tutorial--hero {
  justify-content: flex-start;
}

.help-tutorial--hero .help-tutorial-head h3 {
  font-size: clamp(19px, 1.5vw, 22px);
}

.help-tutorial--hero .help-howto {
  font-size: 14.5px;
}

.help-tutorial-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-tutorial-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink, #0f172a);
}

.help-tutorial-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted, #52606d);
}

/* A numbered walkthrough: the marker is drawn by CSS so the markup can stay
   a plain <ol> and every step reads as a real sequence. */
.help-howto {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: howto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #52606d);
}

.help-howto li {
  position: relative;
  counter-increment: howto;
  padding-left: 38px;
  min-height: 28px;
}

.help-howto li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-navy-700, #0b3c5d);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.help-howto strong {
  color: var(--ink, #0f172a);
  font-weight: 600;
}

.help-howto a {
  color: var(--brand-navy-700, #0b3c5d);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-tutorial .help-link {
  margin-top: auto;
  align-self: flex-start;
}

[data-theme="dark"] .help-section--howto {
  background: #0c1d2e;
  border-color: #1e3a52;
}

[data-theme="dark"] .help-tutorial {
  background: #0a1622;
  border-color: #1e3a52;
}

[data-theme="dark"] .help-tutorial-head h3,
[data-theme="dark"] .help-howto strong {
  color: #e7eef7;
}

[data-theme="dark"] .help-tutorial-head p,
[data-theme="dark"] .help-howto {
  color: #9fb3c8;
}

[data-theme="dark"] .help-howto a {
  color: #9fc7e8;
}

[data-theme="dark"] .help-howto li::before {
  background: var(--brand-orange-500, #ff7f11);
  color: #1a0d00;
}

/* --- responsive ------------------------------------------------------- */

/* The page previously had no breakpoints, so the 258px card grid and the
   contact band did all their adapting on their own and the tour grid left
   a ragged column on tablets. These tiers handle the shell, the grid and
   the action rows explicitly. */
@media (max-width: 1024px) {
  .help-shell {
    padding: 0 clamp(16px, 4vw, 24px);
  }
}

@media (max-width: 1100px) {
  .help-tutorial--hero,
  .help-tutorial--side {
    grid-column: span 12;
  }

  .help-tutorial--third {
    grid-column: span 6;
  }
}

@media (max-width: 820px) {
  .help-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
  }

  .help-section {
    padding: clamp(26px, 5vw, 44px) 0;
  }
}

@media (max-width: 640px) {
  .help-hero {
    padding: 32px 0 34px;
  }

  .help-section {
    padding: 26px 0;
  }

  .help-grid,
  .help-grid--two {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .help-tutorials {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .help-tutorial,
  .help-tutorial--hero,
  .help-tutorial--side,
  .help-tutorial--third {
    grid-column: 1 / -1;
  }

  .help-tutorial {
    padding: 16px;
  }

  .help-howto {
    font-size: 13.5px;
    gap: 11px;
  }

  .help-card,
  .help-panel {
    padding: 16px;
  }

  /* A card action that is only as wide as its label looks like a link on a
     phone; full width makes it a real tap target. */
  .help-card .help-btn {
    width: 100%;
    justify-content: center;
  }

  .help-hero-actions .help-btn,
  .help-contact-actions .help-btn {
    flex: 1 1 100%;
  }

  .help-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .help-contact-actions {
    width: 100%;
  }

  .help-lede,
  .help-hero-text {
    font-size: 14px;
  }

  .help-faq-item {
    padding: 0 14px;
  }

  .help-faq-item summary {
    padding: 13px 0;
    font-size: 14px;
  }

  .help-faq-item p {
    font-size: 13.5px;
  }
}

@media (max-width: 380px) {
  .help-shell {
    padding: 0 14px;
  }

  .help-section h2 {
    font-size: 19px;
  }

  .help-card h3 {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .help-btn {
    transition: none;
  }
}
