/* Help-centre specific styles. Loaded alongside legal.css, which supplies the shared header,
   footer, base typography and .legal-main content rules. These pages are plain HTML in
   public/ (help.html, help-setup.html, help-line.html, help-messenger.html), matching the
   legal-page pattern. Light theme only. */

.help-breadcrumb {
  font-size: 0.8rem;
  color: rgba(36, 49, 38, 0.55);
  margin: 0 0 1.5rem;
}
.help-breadcrumb a {
  color: rgba(36, 49, 38, 0.55);
}
.help-breadcrumb a:hover {
  color: var(--ink);
  text-decoration: none;
}

.help-lead {
  font-size: 1.05rem;
  color: rgba(36, 49, 38, 0.8);
  margin: 0 0 2rem;
}

/* Card grid on the hub page */
.help-cards {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
@media (min-width: 640px) {
  .help-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
.help-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.help-card:hover {
  text-decoration: none;
  border-color: var(--primary);
  box-shadow: 0 8px 24px -12px rgba(21, 42, 29, 0.25);
  transform: translateY(-2px);
}
.help-card__icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  background: rgba(94, 163, 104, 0.12);
  color: var(--primary);
  margin-bottom: 0.7rem;
}
.help-card__icon svg {
  height: 1.25rem;
  width: 1.25rem;
}
.help-card__title {
  font-family: "IBM Plex Sans Thai", "Anuphan", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 0.2rem;
}
.help-card__desc {
  font-size: 0.875rem;
  color: rgba(36, 49, 38, 0.7);
  margin: 0;
  line-height: 1.5;
}

/* Numbered step list */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0 2rem;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.4rem;
  min-height: 2rem;
  color: rgba(36, 49, 38, 0.85);
  line-height: 1.6;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15rem;
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-family: "IBM Plex Sans Thai", "Anuphan", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.steps strong {
  color: var(--ink);
}

/* Tinted callout box */
.callout {
  border: 1px solid rgba(94, 163, 104, 0.35);
  background: rgba(94, 163, 104, 0.09);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  color: rgba(36, 49, 38, 0.85);
  line-height: 1.6;
}
.callout p {
  margin: 0;
  color: inherit;
}
.callout strong {
  color: var(--ink);
}

/* Inline CTA button */
.help-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.6rem;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
  transition: background 0.15s ease;
}
.help-cta:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
}

.help-contact {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1.75rem;
}

/* Annotated screenshot: wraps a step's <img> so a .help-mark badge can be positioned over the
   exact spot to click. Coordinates are percentages of the image's own box (set inline via
   style="left:X%;top:Y%" on each .help-mark), so the marker tracks the click target correctly
   at any rendered width -- nothing is baked into the image pixels themselves. */
.help-shot {
  position: relative;
  margin: 0.75rem 0 1.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px -16px rgba(21, 42, 29, 0.35);
  cursor: zoom-in;
}
.help-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.help-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  height: 1.9rem;
  width: 1.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #f5a623;
  color: #241a03;
  font-family: "IBM Plex Sans Thai", "Anuphan", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Click-to-zoom overlay for .help-shot screenshots (public/help-lightbox.js builds/toggles this
   -- no markup needed per page, just the script tag). Reuses the clicked .help-shot's own
   innerHTML (img + .help-mark), so the badge's percentage-based position lands correctly at the
   larger size for free. */
.help-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(21, 42, 29, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.help-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.help-lightbox__inner {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.help-lightbox__inner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 4rem);
  object-fit: contain;
}
.help-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.help-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.help-lightbox__close svg {
  height: 1.25rem;
  width: 1.25rem;
}

/* ---------- Help hub (help.html) ---------- */
.hub-hero {
  background: radial-gradient(60rem 22rem at 80% -10%, rgba(94, 163, 104, 0.22), transparent 70%),
    linear-gradient(180deg, #eef5ef 0%, #fff 100%);
  border-bottom: 1px solid rgba(222, 220, 207, 0.6);
}
.hub-hero__inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
}
.hub-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-dark);
}
.hub-hero h1 {
  margin: 0;
  font-family: "IBM Plex Sans Thai", "Anuphan", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hub-lead {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(36, 49, 38, 0.75);
}
.hub-main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}
.hub-main a:hover {
  text-decoration: none;
}

.hub-start {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #1d3a28, var(--chrome));
  color: #fff;
  box-shadow: 0 18px 40px -22px rgba(21, 42, 29, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hub-start:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -20px rgba(21, 42, 29, 0.8);
}
.hub-start__icon {
  flex: none;
  display: flex;
  height: 3.25rem;
  width: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: rgba(94, 163, 104, 0.25);
  color: #8fd19a;
}
.hub-start__icon svg {
  height: 1.6rem;
  width: 1.6rem;
}
.hub-start__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.hub-start__badge {
  align-self: flex-start;
  border-radius: 9999px;
  background: var(--primary);
  padding: 0.1rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
}
.hub-start__title {
  font-family: "IBM Plex Sans Thai", "Anuphan", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}
.hub-start__desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}
.hub-start__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}
.hub-start .hub-card__arrow {
  margin-top: 0;
  color: #fff;
}

.hub-heading {
  margin: 2.75rem 0 1rem;
  font-family: "IBM Plex Sans Thai", "Anuphan", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}
.hub-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.hub-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.hub-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 28px -14px rgba(21, 42, 29, 0.3);
  transform: translateY(-2px);
}
.hub-card__icon {
  flex: none;
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(94, 163, 104, 0.12);
  color: var(--primary-dark);
  transition: background 0.15s ease, color 0.15s ease;
}
.hub-card:hover .hub-card__icon {
  background: var(--primary);
  color: #fff;
}
.hub-card__icon svg {
  height: 1.35rem;
  width: 1.35rem;
}
.hub-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.hub-card__title {
  font-family: "IBM Plex Sans Thai", "Anuphan", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}
.hub-card__desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(36, 49, 38, 0.7);
}
.hub-card__arrow {
  flex: none;
  height: 1.1rem;
  width: 1.1rem;
  margin-top: 0.2rem;
  color: rgba(36, 49, 38, 0.35);
  transition: transform 0.15s ease, color 0.15s ease;
}
.hub-card:hover .hub-card__arrow {
  transform: translateX(3px);
  color: var(--primary-dark);
}
.hub-start:hover .hub-card__arrow {
  transform: translateX(3px);
}

.hub-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 3rem;
  padding: 1.75rem 2rem;
  border-radius: 1.1rem;
  background: #eef5ef;
  border: 1px solid rgba(94, 163, 104, 0.3);
}
.hub-contact h2 {
  margin: 0 0 0.3rem;
  font-family: "IBM Plex Sans Thai", "Anuphan", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.hub-contact p {
  margin: 0;
  color: rgba(36, 49, 38, 0.75);
}
.hub-contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hub-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.15s ease;
}
.hub-btn:hover {
  background: rgba(36, 49, 38, 0.05);
  color: var(--ink);
}
.hub-btn--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.hub-btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
}
@media (max-width: 639px) {
  .hub-start {
    flex-wrap: wrap;
  }
  .hub-start__go {
    width: 100%;
  }
}
