/* SortingGo — Official Marketing Site (Phase 1)
 * Design tokens intentionally match the sortinggo-site / Logistics2026 campaign page
 * (primary #2563eb, ink #1a1a2e) so all SortingGo properties feel like one product.
 * This file is the site's own base stylesheet — no external dependency.
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background: #fff;
}

a, button, summary {
  min-height: 44px;
}

img, svg { max-width: 100%; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn-icon { flex-shrink: 0; }

.btn:active { transform: scale(0.98); }

.btn:focus-visible {
  outline: 3px solid #7c9bff;
  outline-offset: 2px;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1a56a4; }

.btn-secondary { background: transparent; border-color: #c7cfe6; color: #1a1a2e; }
.btn-secondary:hover { border-color: #2563eb; color: #2563eb; background: #f0f4ff; }

.btn-tertiary { background: transparent; color: #555; font-weight: 600; padding: 8px 14px; min-height: auto; }
.btn-tertiary:hover { color: #2563eb; }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

.section-dark .btn-secondary { border-color: rgba(255,255,255,0.4); color: #fff; }
.section-dark .btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.section-dark .btn-primary { background: #7c9bff; color: #10101c; }
.section-dark .btn-primary:hover { background: #a3b8ff; }

/* Google's official "Get it on Google Play" badge — used as-is per Google's brand
   guidelines (no recoloring, no extra chrome around it), so this is a plain image
   link rather than a `.btn` variant. */
.google-play-badge-link {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s, transform 0.1s;
}
.google-play-badge-link:hover { opacity: 0.85; }
.google-play-badge-link:active { transform: scale(0.98); }
.google-play-badge-link:focus-visible {
  outline: 3px solid #7c9bff;
  outline-offset: 2px;
  border-radius: 8px;
}
.google-play-badge { height: 56px; width: auto; display: block; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}

.primary-nav {
  display: flex;
  gap: 22px;
}

.primary-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
}

.primary-nav a:hover { color: #2563eb; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.lang-switch a, .lang-switch span {
  padding: 3px 9px;
  border-radius: 12px;
  text-decoration: none;
}

.lang-switch a { color: #555; background: #f4f5f7; }
.lang-switch a:hover { background: #e0e8ff; color: #2563eb; }
.lang-switch span.current { color: #fff; background: #2563eb; font-weight: 600; }

/* ── Language dropdown (desktop header) ────────────────────────────── */

.lang-dropdown { position: relative; }

.lang-dropdown summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  border: 1px solid #e4e7ef;
}

.lang-dropdown summary::-webkit-details-marker { display: none; }
.lang-dropdown summary:hover { background: #f4f5f7; border-color: #d8deee; }
.lang-dropdown[open] summary { background: #f0f4ff; border-color: #c7d5f7; color: #2563eb; }

/* Without this, a flex item's default min-width:auto lets CJK text (which line-breaks
   between any two characters by default) shrink to a single character wide and wrap
   into a vertical stack instead of staying on one line. */
.lang-current-label { white-space: nowrap; flex-shrink: 0; }

.lang-globe-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}

.lang-dropdown[open] .lang-caret { transform: rotate(180deg); }

.lang-dropdown-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  z-index: 30;
}

.lang-dropdown[open] > .lang-dropdown-panel {
  display: flex;
}

.lang-dropdown-panel a {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
}

.lang-dropdown-panel a:hover { background: #f4f5f7; }
.lang-dropdown-panel a.is-active { color: #2563eb; background: #f0f4ff; font-weight: 700; }

.mobile-menu { display: none; position: relative; }

.mobile-menu > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 8px;
}

.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-menu > summary:hover { background: #f4f5f7; }

.mobile-menu-icon,
.mobile-menu-icon::before,
.mobile-menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #1a1a2e;
  position: relative;
}

.mobile-menu-icon::before { content: ""; position: absolute; top: -6px; }
.mobile-menu-icon::after { content: ""; position: absolute; top: 6px; }

.mobile-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 12px;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}

.mobile-menu[open] > .mobile-menu-panel {
  display: flex;
}

.mobile-menu-panel a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #1a1a2e;
  text-decoration: none;
  font-weight: 500;
}

.mobile-menu-panel a:hover { background: #f4f5f7; }

/* ── Section shells ─────────────────────────────────────────────────── */

.section { padding: 64px 0; scroll-margin-top: 76px; }
.section-light { background: #fff; }
.section-muted { background: #f4f5f7; }
.section-dark { background: #1a1a2e; color: #fff; }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; letter-spacing: -0.3px; margin-bottom: 10px; }
.section-dark .section-title { color: #fff; }
.section-subtitle { font-size: 1rem; color: #666; line-height: 1.7; }
.section-dark .section-subtitle { color: #c8d0ea; }

.page-hero {
  background: #1a1a2e;
  color: #fff;
  padding: 48px 0;
  text-align: center;
}
.page-hero h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 12px; }
.page-hero p { color: #c8d0ea; max-width: 640px; margin: 0 auto; font-size: 1.02rem; line-height: 1.7; }
.page-hero .updated { font-size: 0.85rem; color: #a0aec0; margin-top: 8px; }

/* ── Home hero ──────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(180deg, #1a1a2e 0%, #23233f 100%);
  color: #fff;
  padding: 64px 0 52px;
  text-align: center;
}

.hero-inner { max-width: 680px; margin: 0 auto; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  color: #a8b3d6;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 20px;
}

.hero h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 18px; }
.hero-desc { font-size: 1.08rem; line-height: 1.8; color: #c8d0ea; margin-bottom: 14px; }
.hero-tagline { font-size: 0.95rem; font-style: italic; color: #7c9bff; font-weight: 600; margin-bottom: 32px; }

.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.hero-ctas .btn { min-width: 220px; }
.hero-ctas .btn-tertiary { color: #a8b3d6; min-width: auto; }
.hero-ctas .btn-tertiary:hover { color: #fff; }

/* ── Video ──────────────────────────────────────────────────────────── */

.video-frame {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #10101c;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}

.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dims the YouTube thumbnail so the play button stays legible against bright frames */
.video-frame:has(.video-poster)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.35);
  z-index: 1;
}

.video-play {
  position: relative;
  z-index: 2;
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #2563eb;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.video-play:hover { background: #1a56a4; }
.video-play:active { transform: scale(0.96); }
.video-play:focus-visible { outline: 3px solid #7c9bff; outline-offset: 3px; }
.video-play svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }

.video-placeholder-note { color: #8b93b8; font-size: 0.85rem; text-align: center; padding: 0 20px; }
.video-todo {
  display: inline-block; margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem; color: #5a6ba8;
  background: rgba(124,155,255,0.12);
  padding: 2px 8px; border-radius: 4px;
}
.video-iframe { width: 100%; height: 100%; border: 0; }

/* ── Steps / process flow ──────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step { background: #fff; border: 1px solid #e8ecf5; border-radius: 12px; padding: 22px 18px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #2563eb; color: #fff; font-weight: 700; font-size: 0.85rem;
  margin-bottom: 12px;
}
.step-title { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.step-desc { font-size: 0.85rem; color: #666; line-height: 1.6; }

.flow {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin-top: 32px; font-size: 0.9rem; font-weight: 600; color: #1a1a2e;
}
.section-dark .flow { color: #fff; }
.flow span { background: #eef2ff; border-radius: 999px; padding: 8px 16px; }
.section-dark .flow span { background: rgba(255,255,255,0.1); }
.flow .flow-arrow { background: none; color: #a0aec0; padding: 0 2px; }

/* ── Pain point / solution ─────────────────────────────────────────── */

.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
  position: relative;
}

.ps-col {
  position: relative;
  border-radius: 16px;
  padding: 32px 30px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 25, 50, 0.05);
}

.ps-problem { border: 1px solid #f0dcdb; border-top: 3px solid #d4534c; }
.ps-solution { border: 1px solid #dbe3f7; border-top: 3px solid #2563eb; }

.ps-col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #1a1a2e;
}

.ps-col h3::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

.ps-problem h3::before { content: "✕"; background: #d4534c; }
.ps-solution h3::before { content: "✓"; background: #2563eb; }

.solution-demo { margin-top: 34px; }
.solution-demo-title {
  margin-bottom: 16px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
}

.ps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2a2a3a;
}

.ps-list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
}

.ps-problem .ps-list::before { background: rgba(212, 83, 76, 0.2); }
.ps-solution .ps-list::before { background: rgba(37, 99, 235, 0.2); }

.ps-list li { position: relative; padding: 8px 0; }

.ps-list li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff;
}

.ps-problem .ps-list li::before { background: #d4534c; }
.ps-solution .ps-list li::before { background: #2563eb; }

.ps-list li:last-child {
  font-weight: 800;
  color: #1a1a2e;
}

@media (min-width: 761px) {
  .ps-grid::before {
    content: "→";
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(26, 26, 46, 0.25);
    z-index: 2;
  }
}

.ps-note {
  margin-top: 28px; text-align: center; font-size: 0.95rem; color: #444;
  max-width: 620px; margin-left: auto; margin-right: auto; line-height: 1.8;
}

.ps-note--highlight { font-size: 1.15rem; color: #1a8a4a; }

/* ── Feature cards ──────────────────────────────────────────────────── */

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { background: #fff; border: 1px solid #e8ecf5; border-radius: 12px; padding: 24px 22px; }
.feature-title { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 10px; }
.feature-desc { font-size: 0.87rem; color: #555; line-height: 1.7; }
.feature-note {
  display: block; margin-top: 10px; font-size: 0.76rem; color: #8a6d1a;
  background: #fdf6e3; border-radius: 6px; padding: 6px 10px;
}

.features-cta { text-align: center; margin-top: 36px; }

/* ── Solutions ──────────────────────────────────────────────────────── */

.solutions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.solution-card {
  display: block; background: #fff; border: 1px solid #e8ecf5; border-radius: 14px;
  padding: 24px 22px; text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}
.solution-card:hover { border-color: #2563eb; box-shadow: 0 6px 20px rgba(37,99,235,0.12); transform: translateY(-2px); }
.solution-card:focus-visible { outline: 3px solid #7c9bff; outline-offset: 2px; }
.solution-card h3 { font-size: 1.02rem; font-weight: 700; color: #1a1a2e; margin-bottom: 12px; }
.solution-pain, .solution-fix { font-size: 0.84rem; color: #555; line-height: 1.6; margin-bottom: 6px; }
.solution-pain strong, .solution-fix strong { color: #1a1a2e; }

/* ── Printing ───────────────────────────────────────────────────────── */

.print-diagram {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 0 auto 32px; max-width: 420px;
}
.print-node {
  width: 100%; text-align: center; background: #fff; border: 1px solid #e8ecf5;
  border-radius: 10px; padding: 12px 16px; font-size: 0.88rem; font-weight: 600; color: #1a1a2e;
}
.print-arrow { color: #a0aec0; font-size: 1rem; }
.print-branch { display: flex; gap: 14px; width: 100%; }
.print-branch .print-node { flex: 1; }
.print-note { text-align: center; font-size: 0.9rem; color: #555; max-width: 620px; margin: 0 auto 32px; line-height: 1.8; }

.spec-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.spec-chip {
  background: #fff; border: 1px solid #e8ecf5; border-radius: 10px;
  padding: 14px 12px; text-align: center; font-size: 0.85rem; font-weight: 600; color: #1a1a2e;
}

/* ── Subscription plans ────────────────────────────────────────────── */

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }

.plan-card {
  border: 2px solid #e0e0e0; border-radius: 12px; padding: 22px 18px 20px;
  background: #fafafa; display: flex; flex-direction: column;
}
.plan-card--lite { border-color: #2563eb; background: #f0f4ff; }
.plan-card--std { border-color: #1a56a4; background: #1a56a4; color: #fff; }
.plan-card--pro { border-color: #b8860b; background: #1a1a2e; color: #fff; }

.plan-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: #999; margin-bottom: 6px;
}
.plan-card--lite .plan-badge { color: #2563eb; }
.plan-card--std .plan-badge { color: #cfe0fa; }
.plan-card--pro .plan-badge { color: #d4af37; }

.plan-price-row { display: flex; align-items: baseline; gap: 3px; margin-bottom: 4px; }
.plan-amount { font-size: 1.9rem; font-weight: 800; color: #1a1a2e; line-height: 1; }
.plan-card--lite .plan-amount { color: #2563eb; }
.plan-card--std .plan-amount, .plan-card--pro .plan-amount { color: #fff; }
.plan-period { font-size: 0.82rem; color: #888; }
.plan-card--std .plan-period { color: #cdd9f2; }
.plan-card--pro .plan-period { color: #a0aec0; }

.plan-audience {
  font-size: 0.78rem; color: #666; margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8; line-height: 1.5;
}
.plan-card--std .plan-audience { color: #cdd9f2; border-bottom-color: rgba(255,255,255,0.25); }
.plan-card--pro .plan-audience { color: #a0aec0; border-bottom-color: #4a3a1e; }

.plan-includes { list-style: none; padding: 0; margin: 0; font-size: 0.81rem; flex: 1; }
.plan-includes li { padding: 5px 0; display: flex; align-items: flex-start; gap: 7px; color: #444; line-height: 1.4; }
.plan-card--std .plan-includes li { color: #eaf1fc; }
.plan-card--pro .plan-includes li { color: #c0c8e0; }
.plan-includes li::before { content: "✅"; flex-shrink: 0; font-size: 0.72rem; margin-top: 1px; }
.plan-includes li.no::before { content: "❌"; }
.plan-includes li.no { color: #bbb; }
.plan-card--std .plan-includes li.no { color: rgba(255,255,255,0.5); }
.plan-card--pro .plan-includes li.no { color: #4a5a7a; }

/* ── Feature matrix ─────────────────────────────────────────────────── */

.version-badge {
  font-size: 0.72rem; font-weight: 600; background: #eef2ff; color: #555;
  border-radius: 4px; padding: 2px 8px; vertical-align: middle; margin-left: 6px;
}

.legend { display: inline-block; font-size: 0.83rem; margin-right: 10px; white-space: nowrap; }

.matrix-wrapper { border: 1px solid #e8ecf5; border-radius: 10px; overflow: hidden; overflow-x: auto; margin-top: 18px; }

.matrix-col-hd {
  display: grid; grid-template-columns: 1fr 84px 84px 84px 96px;
  background: #1a1a2e; color: #fff; font-weight: 700; font-size: 0.83rem; min-width: 560px;
}
.matrix-col-hd > div { padding: 11px 14px; text-align: center; line-height: 1.4; }
.matrix-col-hd > div:first-child { text-align: left; }
.matrix-col-hd .col-pro { background: rgba(255,255,255,0.12); }

.matrix-group { min-width: 560px; }
.matrix-group-hd {
  display: grid; grid-template-columns: 1fr 84px 84px 84px 96px;
  background: #eef2ff; border-top: 2px solid #d0d9f5; padding: 0;
}
.matrix-group-hd-label { grid-column: 1 / -1; padding: 8px 16px; font-weight: 700; font-size: 0.81rem; color: #1a3a8f; letter-spacing: 0.3px; }

.matrix-row {
  display: grid; grid-template-columns: 1fr 84px 84px 84px 96px;
  border-top: 1px solid #f2f2f2; align-items: center; transition: background 0.1s;
}
.matrix-row:hover { background: #fafbff; }
.matrix-row > div { padding: 8px 14px; font-size: 0.84rem; text-align: center; color: #555; }
.matrix-row > div:first-child { text-align: left; color: #333; padding-right: 8px; }
.matrix-row > div:last-child { background: rgba(37,99,235,0.04); }

.matrix-note { font-size: 0.8rem; color: #888; margin-top: 12px; line-height: 1.6; }

/* ── Support & Contact ─────────────────────────────────────────────── */

.support-prose { max-width: 720px; margin: 0 auto; }
.support-prose p { color: #555; line-height: 1.8; margin-bottom: 14px; }
.support-prose p:last-child { margin-bottom: 0; }
.support-prose strong { color: #1a1a2e; }
.support-prose ul { padding-left: 22px; margin-bottom: 14px; color: #555; }
.support-prose li { margin-bottom: 6px; line-height: 1.7; }
.support-prose .info-box { margin: 16px 0; }
.support-prose .info-box:last-child { margin-bottom: 0; }
.support-prose .info-box p { margin-bottom: 0; }

.support-list { list-style: none; padding: 0; max-width: 720px; margin: 20px auto 0; }
.support-list li { position: relative; padding: 6px 0 6px 24px; color: #555; line-height: 1.6; }
.support-list li::before { content: "✓"; position: absolute; left: 0; color: #2563eb; font-weight: 700; }

.info-box-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 720px; margin: 20px auto 0; }
.info-box {
  position: relative; border-radius: 16px; padding: 32px 30px; background: #fff;
  box-shadow: 0 2px 10px rgba(20, 25, 50, 0.05);
  border: 1px solid #dbe3f7; border-top: 3px solid #2563eb;
}
.info-box-label {
  font-weight: 700; color: #1a1a2e; margin-bottom: 16px; font-size: 1.02rem;
}
.info-box p { color: #444; font-size: 0.87rem; line-height: 1.6; margin-bottom: 8px; }

/* Not-yet-available entry (Help Center's "Ask SortingGo AI" placeholder): muted
   and deliberately link-less, so it reads as announced-but-not-clickable rather
   than as a broken link. */
.info-box--pending {
  max-width: 720px; margin: 20px auto 0;
  background: #f8fafc; border-top-color: #94a3b8; border-style: dashed;
}
.info-box--pending .info-box-label { color: #475569; }
.info-box--pending p { color: #64748b; }

/* Help Center reference index (hub) and the generated pages themselves.
   The index is a <details> per product, closed by default — 49 links per
   language would otherwise bury everything below it. */
.help-ref-group {
  max-width: 720px; margin: 12px auto 0;
  border: 1px solid #dbe3f7; border-radius: 12px; background: #fff;
}
.help-ref-group summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; cursor: pointer; list-style: none;
  border-radius: 12px;
}
.help-ref-group summary::-webkit-details-marker { display: none; }
.help-ref-group summary::marker { content: ""; }
/* Disclosure triangle, drawn so it can rotate on open. */
.help-ref-group summary::before {
  content: ""; flex: none; width: 0; height: 0;
  border-left: 6px solid #64748b;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform 0.15s;
}
.help-ref-group[open] summary::before { transform: rotate(90deg); }
.help-ref-group summary:hover { background: #f8fafc; }
.help-ref-group summary:focus-visible { outline: 3px solid #bfdbfe; outline-offset: 2px; }
.help-ref-heading { font-size: 1.02rem; font-weight: 700; color: #1a1a2e; }
.help-ref-count {
  margin-left: auto; font-size: 0.78rem; font-weight: 700;
  color: #475569; background: #e2e8f0; border-radius: 999px; padding: 2px 10px;
}
.help-ref-list {
  max-width: 720px; margin: 0 auto; padding: 0 18px 16px; list-style: none;
  columns: 2; column-gap: 28px;
}
.help-ref-list li { break-inside: avoid; padding: 5px 0; }
.help-ref-list a { color: #2563eb; text-decoration: none; font-size: 0.9rem; line-height: 1.5; }
.help-ref-list a:hover { text-decoration: underline; }

.help-article-body { max-width: 720px; margin: 28px auto 0; }
.help-article-body h2 { font-size: 1.12rem; font-weight: 700; color: #1a1a2e; margin: 28px 0 10px; }
.help-article-body p, .help-article-body li { color: #444; line-height: 1.75; }
.help-article-body ul, .help-article-body ol { padding-left: 22px; margin: 10px 0; }
.help-article-body li { margin: 6px 0; }
.help-article-note { max-width: 720px; margin: 28px auto 0; }
.help-article-back { max-width: 720px; margin: 20px auto 8px; }
.help-article-back a { color: #2563eb; text-decoration: none; font-size: 0.9rem; }
.help-article-back a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .help-ref-list { columns: 1; }
}

.badge-soon {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: #475569; background: #e2e8f0; border-radius: 999px; padding: 3px 10px;
}

.report-list { list-style: none; padding: 0; max-width: 720px; margin: 16px auto 0; }
.report-list li { padding: 10px 0; border-top: 1px solid #eee; color: #555; line-height: 1.6; }
.report-list li:first-child { border-top: none; }
.report-list strong { color: #1a1a2e; margin-right: 4px; }

/* ── Footer ─────────────────────────────────────────────────────────── */

/* Floating AI help */

.ai-help-fab {
  position: fixed;
  left: 18px;
  top: calc(50dvh - 22px);
  z-index: 40;
}

.ai-help-fab summary {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.22);
  cursor: pointer;
  list-style: none;
  touch-action: none;
  user-select: none;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.ai-help-fab summary::-webkit-details-marker { display: none; }
.ai-help-fab summary::marker { content: ""; }
.ai-help-fab summary:hover { background: #1d4ed8; box-shadow: 0 16px 34px rgba(30, 64, 175, 0.28); }
.ai-help-fab[open] summary { background: #1d4ed8; transform: translateY(-1px); }
.ai-help-fab.is-dragging summary { cursor: grabbing; transition: none; transform: none; }
.ai-help-fab summary:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.ai-help-fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.ai-help-fab-panel {
  position: absolute;
  left: 54px;
  top: 0;
  width: max-content;
  min-width: 132px;
  max-width: calc(100vw - 88px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.ai-help-fab.is-docked-right .ai-help-fab-panel { left: auto; right: 54px; }
.ai-help-fab.is-lower .ai-help-fab-panel { top: auto; bottom: 0; }

.ai-help-fab-title {
  margin: 0 2px 2px;
  color: #1e40af;
  font-size: 0.76rem;
  font-weight: 400;
  white-space: nowrap;
}

.ai-help-fab-link {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  padding: 9px 11px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}

.ai-help-fab-link:hover { background: #f8fafc; border-color: #cbd5e1; color: #1d4ed8; }
.ai-help-fab-link:focus-visible { outline: 3px solid #bfdbfe; outline-offset: 2px; }

/* Official Help Center sits above the third-party assistants and is styled as
   the primary choice — the panel's other entries leave the site, this one does
   not. Separated by a rule so the grouping reads without needing a sub-heading
   in nine languages. */
.ai-help-fab-link--primary {
  background: #2563eb; border-color: #2563eb; color: #fff;
  margin-bottom: 4px; padding-bottom: 13px;
  border-bottom: 1px solid #2563eb;
}
.ai-help-fab-link--primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.site-footer { background: #fff; border-top: 1px solid #e0e0e0; padding: 32px 0; text-align: center; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; font-size: 0.84rem; }
.footer-links a { color: #555; text-decoration: none; }
.footer-links a:hover { color: #2563eb; }
.footer-copy { font-size: 0.82rem; color: #888; }

/* The global `a, button, summary { min-height: 44px }` touch-target rule makes
   every item in this row 44px tall, but a block-level <a> puts its text at the
   top of that box while a <button> centres its own content — which left the
   "Cookie 偏好設定" button sitting ~10px lower than the three links next to it.
   Centring both inside the 44px target lines them up and keeps the touch area. */
.footer-links a,
.footer-links .footer-consent-btn { display: inline-flex; align-items: center; }

.footer-links .footer-consent-btn { background: none; border: none; padding: 0; font: inherit; color: #555; cursor: pointer; text-decoration: none; }
.footer-links .footer-consent-btn:hover { color: #2563eb; }

/* Cookie consent banner — reuses .section-dark's palette (#1a1a2e/#fff) so
   .btn-primary/.btn-secondary already read correctly without extra overrides. */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 16px 0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18);
}
.consent-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.consent-banner__text { margin: 0; font-size: 0.86rem; color: #c8d0ea; }
.consent-banner__text a { color: #fff; text-decoration: underline; }
.consent-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .primary-nav, .header-actions .lang-dropdown, .header-actions .btn { display: none; }
  .mobile-menu { display: block; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .ps-grid { grid-template-columns: 1fr; gap: 20px; }
  .info-box-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-desc { font-size: 0.95rem; }
  .hero-ctas .btn { width: 100%; }

  .page-hero h1 { font-size: 1.4rem; }

  .consent-banner__inner { flex-direction: column; align-items: stretch; text-align: center; }
  .consent-banner__actions { justify-content: center; }

  .section { padding: 44px 0; }
  .section-title { font-size: 1.3rem; }

  .steps, .features-grid, .solutions-grid, .plan-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .print-branch { flex-direction: column; }
  .ai-help-fab { left: 14px; }
}

/* ── Resources hub & SEO articles ────────────────────────────────────
 * Appended block: nothing above this line is modified. Reuses the site's
 * existing tokens (#2563eb primary, #1a1a2e ink, #f4f5f7 muted) and mirrors
 * .support-prose's long-form measurements so articles read like the rest of
 * the site rather than like a bolted-on blog.
 */

/* Breadcrumb */
.breadcrumb { margin-bottom: 18px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 0.86rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.breadcrumb a { color: inherit; opacity: 0.85; text-decoration: none; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.breadcrumb [aria-current="page"] { opacity: 0.7; }

/* Hub */
.resources-hero__supporting { margin-top: 10px; font-size: 0.94rem; opacity: 0.85; }
.resources-empty { text-align: center; color: #666; padding: 24px 0; }

.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.resource-grid--featured { grid-template-columns: repeat(2, 1fr); }

.resource-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.resource-card:hover { border-color: #2563eb; box-shadow: 0 6px 20px rgba(26, 26, 46, 0.08); transform: translateY(-2px); }
.resource-card__img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.resource-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.resource-card__cat { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #2563eb; }
.resource-card__title { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; line-height: 1.45; }
.resource-card__desc { font-size: 0.92rem; color: #666; line-height: 1.65; flex: 1; }
.resource-card__more { font-size: 0.88rem; font-weight: 700; color: #2563eb; }

/* Article shell */
.article-header { background: #1a1a2e; color: #fff; padding: 48px 0 40px; text-align: center; }
.article-header h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.35; max-width: 760px; margin: 0 auto 14px; }
.article-meta { font-size: 0.88rem; color: #c8d0ea; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.article-meta__cat { color: #7c9bff; font-weight: 700; }
/* Cover image is the first element inside .article-prose, so it shares the
   text measure. No top margin — .article-prose's `> * + *` rule only spaces
   siblings after the first, and the layout already provides the gap above. */
.article-cover { margin: 0 0 28px; }
.article-cover img { width: 100%; height: auto; border-radius: 14px; display: block; }

.draft-banner { background: #fff4d6; border: 1px solid #e0b34a; color: #6b4c00; padding: 12px 16px; border-radius: 10px; margin: 24px auto 0; max-width: 760px; font-size: 0.9rem; text-align: center; }

.article-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: start; padding: 48px 0 8px; }
.article-layout--no-toc { grid-template-columns: minmax(0, 1fr); justify-items: center; }

.article-toc { position: sticky; top: 88px; font-size: 0.88rem; }
.article-toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.6px; color: #888; margin-bottom: 12px; }
.article-toc ol { list-style: none; display: flex; flex-direction: column; gap: 9px; border-left: 2px solid #e6e8ec; padding-left: 14px; }
.article-toc a { color: #555; text-decoration: none; line-height: 1.45; display: block; }
.article-toc a:hover { color: #2563eb; }

/* Article body — same measure and rhythm as .support-prose */
.article-prose { max-width: 720px; width: 100%; }
.article-prose > * + * { margin-top: 16px; }
.article-prose p { color: #555; line-height: 1.8; }
.article-prose strong { color: #1a1a2e; }
.article-prose a { color: #2563eb; }
.article-prose h2 { font-size: 1.4rem; font-weight: 800; color: #1a1a2e; line-height: 1.4; margin-top: 40px; scroll-margin-top: 84px; }
.article-prose h3 { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; line-height: 1.45; margin-top: 28px; scroll-margin-top: 84px; }
.article-prose ul, .article-prose ol { padding-left: 22px; color: #555; }
.article-prose li { margin-bottom: 6px; line-height: 1.75; }
.article-prose blockquote { border-left: 3px solid #2563eb; padding: 4px 0 4px 16px; color: #666; font-style: italic; }
.article-prose code { background: #f4f5f7; border-radius: 4px; padding: 2px 6px; font-size: 0.9em; }
.article-prose pre { background: #1a1a2e; color: #f4f5f7; padding: 16px; border-radius: 10px; overflow-x: auto; }
.article-prose pre code { background: none; padding: 0; color: inherit; }
.article-prose hr { border: none; border-top: 1px solid #e6e8ec; margin: 32px 0; }

/* Tables scroll instead of overflowing the page on a phone */
.article-prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; display: block; overflow-x: auto; white-space: nowrap; }
.article-prose th, .article-prose td { border: 1px solid #e6e8ec; padding: 9px 12px; text-align: left; }
.article-prose th { background: #f4f5f7; color: #1a1a2e; font-weight: 700; }

.article-figure { margin: 24px 0; }
.article-figure img { width: 100%; height: auto; border-radius: 10px; display: block; }
.article-figure figcaption { font-size: 0.85rem; color: #888; margin-top: 8px; text-align: center; }

.callout { border-radius: 10px; padding: 14px 18px; border-left: 4px solid; }
.callout p { margin: 0; line-height: 1.75; }
.callout p + p, .callout ul, .callout ol { margin-top: 10px; }
.callout--tip { background: #eef4ff; border-color: #2563eb; color: #2c3a56; }
.callout--note { background: #f4f5f7; border-color: #9aa2b1; color: #4a5162; }
.callout--warning { background: #fff4d6; border-color: #e0b34a; color: #6b4c00; }

/* CTAs */
.article-cta-soft { background: #eef4ff; border-radius: 10px; padding: 14px 18px; color: #2c3a56; line-height: 1.7; }
.article-cta-soft a { color: #2563eb; font-weight: 700; }
/* Sits on the page background rather than in a dark card: a filled block at the
   end of a long white article reads as a separate advert, not as the article's
   own closing. A hairline keeps it from looking like one more paragraph. */
.article-cta-end { border-top: 1px solid #e6e8ec; padding: 32px 24px 8px; text-align: center; margin-top: 40px; }
/* margin-top: 0 is load-bearing. `.article-prose h2` is a descendant selector,
   so it also matches this heading and was adding its 40px section spacing
   INSIDE the block, pushing everything off-centre. */
.article-cta-end h2 { font-size: 1.2rem; font-weight: 800; color: #1a1a2e; margin-top: 0; margin-bottom: 10px; }
.article-cta-end p { color: #555; font-size: 0.95rem; line-height: 1.7; max-width: 460px; margin: 0 auto 18px; }
/* The shared badge link is inline-flex, so it sits on a text baseline and
   leaves descender space underneath — enough to visibly offset the box.
   Aligning to the top of the line box removes it without touching the
   component everywhere else it is used. */
.article-cta-end .google-play-badge-link { vertical-align: top; }
.article-cta-end .google-play-badge { width: 188px; height: auto; }

/* Article footer */
.article-footer { padding: 8px 0 56px; }
.related-guides { max-width: 1080px; margin: 48px auto 0; }
.related-guides h2 { font-size: 1.2rem; font-weight: 800; color: #1a1a2e; margin-bottom: 20px; text-align: center; }
.article-back { text-align: center; margin-top: 32px; }
.article-back a { color: #2563eb; font-weight: 700; text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .resource-grid, .resource-grid--featured { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; justify-items: center; }
  .article-toc {
    position: static;
    width: 100%;
    max-width: 720px;
    background: #f4f5f7;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 28px;
  }
  .article-toc ol { border-left: none; padding-left: 0; }
}

@media (max-width: 600px) {
  .resource-grid, .resource-grid--featured { grid-template-columns: 1fr; }
  .article-header { padding: 36px 0 32px; }
  .article-header h1 { font-size: 1.45rem; }
  .article-prose h2 { font-size: 1.2rem; }
  .breadcrumb ol { font-size: 0.8rem; }
}

/* ── Newsletter signup ──────────────────────────────────────────────────── */

.newsletter-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-heading {
  font-size: 1.5rem;
  line-height: 1.35;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.newsletter-description {
  color: #555;
  margin-bottom: 22px;
}

/* Visible label rather than placeholder-as-label: a placeholder disappears the
   moment someone starts typing, and is not a reliable accessible name. */
.newsletter-label {
  display: block;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.newsletter-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.newsletter-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  border: 2px solid #c7cfe6;
  border-radius: 8px;
}

.newsletter-input::placeholder { color: #99a3bd; }

.newsletter-input:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.newsletter-input[aria-invalid="true"] { border-color: #b45309; }

.newsletter-submit { flex: 0 0 auto; }

.newsletter-turnstile { margin-top: 14px; }

.newsletter-status {
  margin-top: 12px;
  font-size: 0.92rem;
  text-align: left;
  min-height: 1.4em;
}

.newsletter-status[data-state="success"] { color: #1a3a8f; }
.newsletter-status[data-state="error"] { color: #b45309; }

.newsletter-note {
  margin-top: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #666;
}

.newsletter-note a { color: #2563eb; }

/* Stacked below 560px: side by side, the input drops under ~180px and the
   address becomes unreadable while typing it. */
@media (max-width: 560px) {
  .newsletter-row { flex-direction: column; }
  .newsletter-submit { width: 100%; }
}

/* ── Newsletter confirmation pages ──────────────────────────────────────── */

.newsletter-outcome {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-outcome p { color: #555; margin-bottom: 24px; }
