/* ============================================================
   ALGORAM – How It Works page (/pages/how-algoram-works.html)
   Builds on the brand tokens in brand.css (--b1, --g1, --t1 ...).
   Every rule is scoped to .hiw-page so the .lang-hi / .lang-gu
   font rules in style.css don't override the page layout.
   ============================================================ */

.hiw-page {
  --hiw-blue: #007BFF;
  --hiw-green: #10B981;
  --hiw-orange: #F97316;
  --hiw-purple: #8B5CF6;
  --hiw-red: #EF4444;
  --hiw-ink: #0F172A;
  --hiw-muted: #475569;
  --hiw-line: #E2E8F0;
  --hiw-font: 'Inter', 'Noto Sans Devanagari', 'Noto Sans Gujarati', sans-serif;
  --hiw-display: 'Oxanium', 'Noto Sans Devanagari', 'Noto Sans Gujarati', sans-serif;
  font-family: var(--hiw-font);
  color: var(--hiw-ink);
  overflow-x: hidden;
}
.hiw-page h1, .hiw-page h2, .hiw-page h3, .hiw-page h4 {
  font-family: var(--hiw-display);
  margin: 0;
  color: var(--hiw-ink);
}
.hiw-page p, .hiw-page li, .hiw-page span, .hiw-page div, .hiw-page a, .hiw-page button {
  font-family: var(--hiw-font);
}
.hiw-page p { margin: 0; }
.hiw-page svg { display: block; max-width: 100%; }
.hiw-page .hiw-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Section headings ── */
.hiw-page .hiw-head { text-align: center; max-width: 760px; margin: 0 auto 2.75rem; }
.hiw-page .hiw-tag {
  display: inline-block;
  font-family: 'Rajdhani', var(--hiw-font);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 2px;
  color: var(--b2, #0057D9);
  background: var(--bl, #E8F3FF);
  border: 1px solid var(--bm, #BFDBFE);
  padding: 0.3rem 0.9rem; border-radius: 999px;
  margin-bottom: 1rem; line-height: 1.4;
}
.hiw-page .hiw-tag.is-gold { color: #92400E; background: var(--gl, #FFFBEB); border-color: #FDE68A; }
/* letter-spacing pulls Devanagari / Gujarati letters apart */
.lang-hi .hiw-page .hiw-tag, .lang-gu .hiw-page .hiw-tag,
.lang-hi .hiw-page .hiw-badge, .lang-gu .hiw-page .hiw-badge,
.lang-hi .hiw-page .hiw-mock-note, .lang-gu .hiw-page .hiw-mock-note { letter-spacing: 0; }
.hiw-page .hiw-h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; line-height: 1.25; }
.hiw-page .hiw-h2 span, .hiw-page .hiw-h1 span {
  background: var(--grd-logo, linear-gradient(135deg, #007BFF, #F59E0B));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hiw-page .hiw-lead { margin-top: 0.9rem; font-size: 1.02rem; line-height: 1.75; color: var(--hiw-muted); }

/* ── Hero ── */
.hiw-page .hiw-hero { padding: 120px 0 3.5rem; }
.hiw-page .hiw-hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
}
.hiw-page .hiw-h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; line-height: 1.15; }
.hiw-page .hiw-hero .hiw-lead { font-size: 1.08rem; max-width: 560px; }
.hiw-page .hiw-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.hiw-page .hiw-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: #fff; border: 1px solid var(--hiw-line);
  border-radius: 999px; padding: 0.45rem 0.9rem;
  font-size: 0.9rem; font-weight: 600; line-height: 1.4;
  box-shadow: var(--sh-xs, 0 1px 2px rgba(0,0,0,0.04));
}
.hiw-page .hiw-chip svg { width: 18px; height: 18px; flex: none; }

/* Language selector */
.hiw-page .hiw-lang-box {
  margin-top: 2rem; display: inline-flex; flex-direction: column; gap: 0.55rem;
  max-width: 100%;
}
.hiw-page .hiw-lang-label {
  font-size: 0.85rem; font-weight: 600; color: var(--hiw-muted); line-height: 1.4;
  display: flex; align-items: center; gap: 0.4rem;
}
.hiw-page .hiw-lang-label svg { width: 16px; height: 16px; }
.hiw-page .hiw-lang {
  display: inline-flex; padding: 5px; gap: 4px; max-width: 100%;
  background: #fff; border: 1px solid var(--bm, #BFDBFE); border-radius: 14px;
  box-shadow: var(--sh-md, 0 4px 20px rgba(0,119,255,0.1));
}
.hiw-page .hiw-lang button {
  appearance: none; border: 0; cursor: pointer;
  background: transparent; color: var(--hiw-ink);
  font-size: 1rem; font-weight: 700; line-height: 1.3;
  padding: 0.65rem 1.25rem; border-radius: 10px;
  min-height: 44px; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.hiw-page .hiw-lang button[lang="hi"] { font-family: 'Noto Sans Devanagari', var(--hiw-font); }
.hiw-page .hiw-lang button[lang="gu"] { font-family: 'Noto Sans Gujarati', var(--hiw-font); }
.hiw-page .hiw-lang button:hover { background: var(--bl, #E8F3FF); }
.hiw-page .hiw-lang button[aria-pressed="true"] {
  background: var(--grd-blue, linear-gradient(135deg, #40A0FF, #007BFF, #0057D9));
  color: #fff; box-shadow: 0 4px 14px rgba(0,123,255,0.35);
}
.hiw-page .hiw-lang button:focus-visible { outline: 3px solid var(--g1, #F59E0B); outline-offset: 2px; }

/* Hero mock card */
.hiw-page .hiw-mock {
  position: relative; background: #fff; border: 1px solid var(--hiw-line);
  border-radius: 22px; padding: 1.4rem; box-shadow: var(--sh-xl, 0 20px 60px rgba(0,119,255,0.18));
}
.hiw-page .hiw-mock::before {
  content: ''; position: absolute; inset: -14px -14px auto auto; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(245,158,11,0.25), transparent 70%); z-index: -1;
}
.hiw-page .hiw-mock-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.hiw-page .hiw-mock-title { font-weight: 700; font-size: 1rem; line-height: 1.4; display: flex; align-items: center; gap: 0.5rem; }
.hiw-page .hiw-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hiw-green); box-shadow: 0 0 0 0 rgba(16,185,129,0.6); animation: hiwPulse 2s infinite; flex: none; }
.hiw-page .hiw-mock-note { font-size: 0.72rem; color: #94A3B8; font-weight: 600; letter-spacing: 0.5px; line-height: 1.4; }
.hiw-page .hiw-mock-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 0.9rem; border-radius: 12px; background: #F8FAFC; border: 1px solid #EEF2F7;
  margin-bottom: 0.6rem; font-size: 0.92rem; line-height: 1.4;
}
.hiw-page .hiw-pill {
  font-size: 0.78rem; font-weight: 700; padding: 0.22rem 0.65rem; border-radius: 999px; line-height: 1.4; white-space: nowrap;
}
.hiw-page .hiw-pill.is-green { background: #D1FAE5; color: #047857; }
.hiw-page .hiw-toggle { width: 42px; height: 24px; border-radius: 999px; background: var(--hiw-green); position: relative; flex: none; }
.hiw-page .hiw-toggle::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.hiw-page .hiw-mock-chart { margin: 0.9rem 0 0.4rem; border-radius: 12px; background: linear-gradient(180deg, #F8FBFF, #fff); border: 1px solid #EEF2F7; padding: 0.6rem; }
.hiw-page .hiw-mock-scan { font-size: 0.8rem; color: var(--hiw-muted); line-height: 1.4; margin-top: 0.4rem; display: flex; align-items: center; gap: 0.4rem; }
.hiw-page .hiw-flow { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.hiw-page .hiw-flow span {
  font-size: 0.78rem; font-weight: 700; line-height: 1.4;
  padding: 0.3rem 0.65rem; border-radius: 8px; background: var(--bl, #E8F3FF); color: var(--b2, #0057D9);
  animation: hiwFlow 5s infinite;
}
.hiw-page .hiw-flow span:nth-child(2) { animation-delay: 1s; }
.hiw-page .hiw-flow span:nth-child(3) { animation-delay: 2s; }
.hiw-page .hiw-flow span:nth-child(4) { animation-delay: 3s; }
.hiw-page .hiw-flow span:nth-child(5) { animation-delay: 4s; }

/* Journey jump strip */
.hiw-page .hiw-jump { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.hiw-page .hiw-jump a {
  display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--hiw-ink);
  background: #fff; border: 1px solid var(--hiw-line); border-radius: 16px; padding: 1rem 1.2rem;
  box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,0.06)); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hiw-page .hiw-jump a:hover { transform: translateY(-2px); box-shadow: var(--sh-md, 0 4px 20px rgba(0,119,255,0.1)); }
.hiw-page .hiw-jump-num {
  flex: none; font-family: var(--hiw-display); font-weight: 800; font-size: 1.05rem; color: #fff;
  min-width: 56px; height: 40px; padding: 0 0.6rem; border-radius: 12px; display: grid; place-items: center;
  background: var(--grd-blue, #007BFF); line-height: 1;
}
.hiw-page .hiw-jump a.is-auto .hiw-jump-num { background: var(--grd-gold, #F59E0B); }
.hiw-page .hiw-jump strong { display: block; font-size: 0.98rem; line-height: 1.4; }
.hiw-page .hiw-jump small { display: block; color: var(--hiw-muted); font-size: 0.84rem; line-height: 1.5; margin-top: 2px; }

/* ── Steps ── */
.hiw-page .hiw-part { padding: 4.5rem 0; scroll-margin-top: 90px; }
.hiw-page .hiw-part.is-tinted { background: linear-gradient(180deg, #F5F9FF 0%, #fff 100%); }
.hiw-page .hiw-steps { display: grid; gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.hiw-page .hiw-steps.is-four { grid-template-columns: repeat(4, 1fr); }
.hiw-page .hiw-steps.is-six { grid-template-columns: repeat(3, 1fr); }

.hiw-page .hiw-card {
  --c: var(--hiw-blue);
  --c-tint: #EFF6FF;
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--hiw-line); border-radius: 20px;
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,0.06));
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.hiw-page .hiw-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg, 0 12px 48px rgba(0,119,255,0.14)); border-color: color-mix(in srgb, var(--c) 35%, #fff); }
.hiw-page .hiw-card.c-blue   { --c: var(--hiw-blue);   --c-tint: #EFF6FF; }
.hiw-page .hiw-card.c-green  { --c: var(--hiw-green);  --c-tint: #ECFDF5; }
.hiw-page .hiw-card.c-orange { --c: var(--hiw-orange); --c-tint: #FFF7ED; }
.hiw-page .hiw-card.c-purple { --c: var(--hiw-purple); --c-tint: #F5F3FF; }
.hiw-page .hiw-card.c-red    { --c: var(--hiw-red);    --c-tint: #FEF2F2; }

.hiw-page .hiw-card-top { display: flex; align-items: flex-start; gap: 0.8rem; min-height: 3.2rem; }
.hiw-page .hiw-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--hiw-display); font-weight: 800; font-size: 1.3rem; color: #fff; line-height: 1;
  background: var(--c); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 40%, transparent);
}
.hiw-page .hiw-card h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.35; padding-top: 0.15rem; }
.hiw-page .hiw-badge {
  display: inline-block; margin-top: 0.35rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.4px; line-height: 1.4;
  padding: 0.15rem 0.55rem; border-radius: 999px;
  color: var(--c); background: var(--c-tint); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff);
}
.hiw-page .hiw-art {
  margin: 1rem 0 1.1rem; border-radius: 14px; background: var(--c-tint);
  aspect-ratio: 200 / 140; display: grid; place-items: center; overflow: hidden;
}
.hiw-page .hiw-art svg { width: 100%; height: 100%; }
.hiw-page .hiw-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.hiw-page .hiw-checks li {
  position: relative; padding-left: 1.75rem;
  font-size: 0.93rem; line-height: 1.6; color: #334155;
}
.hiw-page .hiw-checks li::before {
  content: ''; position: absolute; left: 0; top: 0.2rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--hiw-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.hiw-page .hiw-card-link {
  margin-top: auto; padding-top: 1.1rem;
  font-size: 0.9rem; font-weight: 700; color: var(--c); text-decoration: none; line-height: 1.4;
}
.hiw-page .hiw-card-link:hover { text-decoration: underline; }

/* Flow arrows between cards (only where cards sit side by side in one row) */
.hiw-page .hiw-arrow {
  position: absolute; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--b1, #007BFF);
  border: 1px solid var(--bm, #BFDBFE); box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,0.06));
  top: 50%; right: -27px; transform: translateY(-50%);
}
.hiw-page .hiw-arrow svg { width: 16px; height: 16px; }
.hiw-page .hiw-steps.is-six > li:nth-child(3n) .hiw-arrow { display: none; }

/* Tip */
.hiw-page .hiw-tip {
  margin-top: 2rem; display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--gl, #FFFBEB); border: 1px solid #FDE68A; border-radius: 16px; padding: 1rem 1.2rem;
  font-size: 0.95rem; line-height: 1.7; color: #78350F;
}
.hiw-page .hiw-tip svg { width: 26px; height: 26px; flex: none; margin-top: 2px; }

/* ── Trading-day timeline ── */
.hiw-page .hiw-day { padding: 4.5rem 0; }
.hiw-page .hiw-timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; position: relative; }
.hiw-page .hiw-timeline::before {
  content: ''; position: absolute; left: 10%; right: 10%; top: 31px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--hiw-purple), var(--hiw-blue), var(--hiw-green), var(--g1, #F59E0B), var(--hiw-blue));
}
.hiw-page .hiw-tl { position: relative; text-align: center; padding: 0 0.25rem; }
.hiw-page .hiw-tl-icon {
  width: 64px; height: 64px; margin: 0 auto 0.9rem; border-radius: 50%;
  display: grid; place-items: center; background: #fff; position: relative; z-index: 1;
  border: 3px solid var(--tc, var(--hiw-blue)); color: var(--tc, var(--hiw-blue));
  box-shadow: 0 6px 18px rgba(15,23,42,0.08);
}
.hiw-page .hiw-tl-icon svg { width: 28px; height: 28px; }
.hiw-page .hiw-tl-time {
  display: inline-block; font-family: var(--hiw-display); font-weight: 800; font-size: 0.95rem; line-height: 1.4;
  color: var(--tc, var(--hiw-blue)); background: #fff; border: 1px solid var(--hiw-line); border-radius: 999px; padding: 0.15rem 0.7rem;
}
.hiw-page .hiw-tl h3 { font-size: 1rem; font-weight: 700; margin-top: 0.6rem; line-height: 1.4; }
.hiw-page .hiw-tl p { font-size: 0.88rem; color: var(--hiw-muted); line-height: 1.6; margin-top: 0.35rem; }
.hiw-page .hiw-tl.is-you .hiw-tl-icon { background: var(--tc); color: #fff; }
.hiw-page .hiw-you {
  display: inline-block; margin-top: 0.5rem; font-size: 0.72rem; font-weight: 700; line-height: 1.4;
  color: #6D28D9; background: #F5F3FF; border-radius: 999px; padding: 0.15rem 0.6rem;
}

/* ── Important note ── */
.hiw-page .hiw-note-sec { padding: 1rem 0 4rem; }
.hiw-page .hiw-note {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center;
  background: linear-gradient(135deg, #FFF5F7 0%, #F5F3FF 55%, #EFF6FF 100%);
  border: 1px solid #E9D5FF; border-radius: 22px; padding: 1.75rem 2rem;
}
.hiw-page .hiw-note-icon { width: 92px; height: 104px; }
.hiw-page .hiw-note-title { font-size: 1.35rem; font-weight: 800; line-height: 1.3; }
.hiw-page .hiw-note-h { margin-top: 0.7rem; font-size: 1.08rem; font-weight: 700; line-height: 1.5; display: flex; gap: 0.5rem; align-items: flex-start; }
.hiw-page .hiw-note-h svg { width: 22px; height: 22px; flex: none; margin-top: 3px; }
.hiw-page .hiw-note-p { margin-top: 0.35rem; color: #334155; line-height: 1.7; padding-left: 1.875rem; }

/* ── Feature band ── */
.hiw-page .hiw-band { background: linear-gradient(135deg, #061433 0%, #0A1F4D 60%, #0B2A66 100%); padding: 2.75rem 0; }
.hiw-page .hiw-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.hiw-page .hiw-feat { display: flex; gap: 0.8rem; align-items: flex-start; }
.hiw-page .hiw-feat-icon {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(64,160,255,0.14); border: 1px solid rgba(64,160,255,0.35); color: #7CC0FF;
}
.hiw-page .hiw-feat:nth-child(even) .hiw-feat-icon { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.4); color: #FCD34D; }
.hiw-page .hiw-feat-icon svg { width: 24px; height: 24px; }
.hiw-page .hiw-feat h3 { color: #fff; font-size: 0.98rem; font-weight: 700; line-height: 1.35; }
.hiw-page .hiw-feat p { color: rgba(226,232,240,0.78); font-size: 0.84rem; line-height: 1.5; margin-top: 0.2rem; }

/* ── CTA ── */
.hiw-page .hiw-cta { padding: 4.5rem 0 2rem; text-align: center; }
.hiw-page .hiw-cta-box {
  background: #fff; border: 1px solid var(--hiw-line); border-radius: 24px; padding: 2.75rem 1.5rem;
  box-shadow: var(--sh-lg, 0 12px 48px rgba(0,119,255,0.14));
}
.hiw-page .hiw-cta-btns { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 1.75rem; }
.hiw-page .hiw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px;
  padding: 0.8rem 1.6rem; border-radius: 12px; font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hiw-page .hiw-btn:hover { transform: translateY(-2px); }
.hiw-page .hiw-btn.is-primary { color: #fff; background: var(--grd-blue, #007BFF); box-shadow: var(--sh-blue, 0 8px 32px rgba(0,123,255,0.3)); }
.hiw-page .hiw-btn.is-gold { color: #fff; background: var(--grd-gold, #F59E0B); box-shadow: var(--sh-gold, 0 8px 32px rgba(245,158,11,0.3)); }

.hiw-page .hiw-disc { padding: 1.5rem 0 3.5rem; }
.hiw-page .hiw-disc p {
  font-size: 0.8rem; line-height: 1.7; color: #64748B;
  background: #F8FAFC; border: 1px solid var(--hiw-line); border-radius: 14px; padding: 1rem 1.2rem;
}

/* ── Trade route map ── */
.hiw-page .map {
  position: relative; overflow: hidden;
  border: 1px solid #DCE7DA; border-radius: 28px; padding: 1.75rem;
  box-shadow: var(--sh-md, 0 4px 20px rgba(0,119,255,0.1));
  background:
    radial-gradient(circle at 10% 30%, rgba(16,185,129,0.10), transparent 18%),
    radial-gradient(circle at 92% 55%, rgba(0,123,255,0.09), transparent 20%),
    radial-gradient(circle at 18% 85%, rgba(245,158,11,0.09), transparent 18%),
    linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    #F7FBF6;
}
.hiw-page .map-top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.hiw-page .map-plate {
  flex: 1 1 360px; max-width: 600px; background: #fff; border: 1px solid var(--hiw-line);
  border-radius: 16px; padding: 1rem 1.2rem; box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,0.06));
}
.hiw-page .map-plate-label {
  display: inline-block; font-size: 0.72rem; font-weight: 800; line-height: 1.4;
  color: #92400E; background: #FEF3C7; border: 1px solid #FCD34D; border-radius: 999px; padding: 0.15rem 0.65rem;
}
.hiw-page .map-plate h3 { font-size: 1.15rem; font-weight: 800; line-height: 1.35; margin-top: 0.55rem; }
.hiw-page .map-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.hiw-page .map-chips span { font-size: 0.8rem; font-weight: 600; line-height: 1.4; background: #F1F5F9; border: 1px solid #E2E8F0; border-radius: 8px; padding: 0.25rem 0.55rem; }
.hiw-page .map-plate p { font-size: 0.78rem; line-height: 1.6; color: #64748B; margin-top: 0.65rem; }
.hiw-page .map-side { display: flex; align-items: flex-start; gap: 1rem; }
.hiw-page .map-compass { width: 76px; height: 76px; flex: none; opacity: 0.85; }
.hiw-page .map-key {
  display: grid; gap: 0.4rem; font-size: 0.82rem; line-height: 1.4; color: #334155;
  background: rgba(255,255,255,0.9); border: 1px solid var(--hiw-line); border-radius: 14px; padding: 0.8rem 1rem;
}
.hiw-page .map-key strong { font-size: 0.78rem; color: #64748B; }
.hiw-page .map-key > span { display: flex; align-items: center; gap: 0.5rem; }
.hiw-page .map-key i { width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--k); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15,23,42,0.15); }
.hiw-page .map-key i.is-detour { border-radius: 4px; background: #FFFBEB; border: 1.5px dashed #F59E0B; box-shadow: none; }

.hiw-page .map-route { list-style: none; margin: 0; padding: 0; }
.hiw-page .map-stop, .hiw-page .map-cap { display: grid; grid-template-columns: 1fr 150px 1fr; column-gap: 1.5rem; }
.hiw-page .map-stop { min-height: 150px; }
.hiw-page .map-stop[data-side="r"] { grid-template-areas: "place road card"; }
.hiw-page .map-stop[data-side="l"] { grid-template-areas: "card road place"; }
.hiw-page .map-cap { height: 64px; }
.hiw-page .map-mid { grid-area: road; position: relative; }
.hiw-page .map-cap .map-mid { grid-area: 1 / 2; }
/* boxes overlap 2px into the next row so the segments join without a hairline */
.hiw-page .map-road { position: absolute; left: 0; top: -2px; width: 100%; height: calc(100% + 4px); overflow: visible; }
.hiw-page .map-road path { fill: none; vector-effect: non-scaling-stroke; }
.hiw-page .map-road .r-edge { stroke: #94A3B8; stroke-width: 34; }
.hiw-page .map-road .r-body { stroke: #475569; stroke-width: 28; }
.hiw-page .map-road .r-line { stroke: #FDE68A; stroke-width: 3; stroke-dasharray: 10 9; animation: hiwRoad 1.6s linear infinite; }
.hiw-page .map-stop { --pc: var(--hiw-blue); }
.hiw-page .map-stop.is-you   { --pc: var(--hiw-purple); }
.hiw-page .map-stop.is-check { --pc: #F59E0B; }
.hiw-page .map-stop.is-go    { --pc: var(--hiw-green); }
.hiw-page .map-stop.is-warn  { --pc: #EA580C; }
.hiw-page .map-stop.is-end   { --pc: #0F172A; }
.hiw-page .map-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--hiw-display); font-weight: 800; font-size: 1.05rem; line-height: 1; color: #fff;
  background: var(--pc); border: 4px solid #fff; box-shadow: 0 6px 16px rgba(15,23,42,0.28);
}
.hiw-page .map-sign {
  position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 2; white-space: nowrap;
  font-family: var(--hiw-display); font-weight: 800; font-size: 0.8rem; line-height: 1.3; color: #fff;
  padding: 0.35rem 0.85rem; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(15,23,42,0.25);
}
.hiw-page .map-sign.is-start { background: var(--hiw-green); }
.hiw-page .map-sign.is-finish { background: #0F172A; padding-left: 1.7rem; }
.hiw-page .map-sign.is-finish::before {
  content: ''; position: absolute; left: 0.45rem; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
  background: repeating-conic-gradient(#0F172A 0 25%, #fff 0 50%) 0 0 / 7px 7px; border: 1px solid #fff; border-radius: 2px;
}
.hiw-page .map-place { grid-area: place; align-self: center; display: flex; align-items: center; gap: 0.6rem; color: #64748B; }
.hiw-page .map-stop[data-side="r"] .map-place { justify-self: end; flex-direction: row-reverse; text-align: right; }
.hiw-page .map-stop[data-side="l"] .map-place { justify-self: start; }
.hiw-page .map-place-ic {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--pc); background: #fff; border: 2px solid color-mix(in srgb, var(--pc) 35%, #fff);
}
.hiw-page .map-place-ic svg { width: 22px; height: 22px; }
.hiw-page .map-place em { font-style: italic; font-weight: 600; font-size: 0.92rem; line-height: 1.35; }
.hiw-page .map-card {
  grid-area: card; align-self: center; position: relative; max-width: 440px; margin: 0.85rem 0;
  background: #fff; border: 1px solid var(--hiw-line); border-top: 4px solid var(--pc);
  border-radius: 16px; padding: 0.9rem 1.1rem 1rem; box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,0.06));
}
.hiw-page .map-stop[data-side="r"] .map-card { justify-self: start; }
.hiw-page .map-stop[data-side="l"] .map-card { justify-self: end; }
.hiw-page .map-card::before {
  content: ''; position: absolute; top: 50%; width: 12px; height: 12px; background: #fff;
  transform: translateY(-50%) rotate(45deg);
}
.hiw-page .map-stop[data-side="r"] .map-card::before { left: -7px; border-left: 1px solid var(--hiw-line); border-bottom: 1px solid var(--hiw-line); }
.hiw-page .map-stop[data-side="l"] .map-card::before { right: -7px; border-right: 1px solid var(--hiw-line); border-top: 1px solid var(--hiw-line); }
.hiw-page .map-time {
  display: inline-block; font-family: var(--hiw-display); font-weight: 800; font-size: 0.78rem; line-height: 1.4;
  color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, #fff); border-radius: 999px; padding: 0.1rem 0.6rem;
}
.hiw-page .map-card h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.4; margin-top: 0.4rem; }
.hiw-page .map-card p { font-size: 0.9rem; line-height: 1.6; color: #475569; margin-top: 0.3rem; }
.hiw-page .map-ticks { list-style: none; margin: 0.55rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hiw-page .map-ticks li {
  font-size: 0.8rem; font-weight: 600; line-height: 1.4; color: #047857;
  background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 8px; padding: 0.2rem 0.55rem 0.2rem 1.45rem; position: relative;
}
.hiw-page .map-ticks li::before { content: ''; position: absolute; left: 0.45rem; top: 50%; width: 0.6rem; height: 0.32rem; border-left: 2px solid #059669; border-bottom: 2px solid #059669; transform: translateY(-70%) rotate(-45deg); }
.hiw-page .map-detour {
  display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.65rem;
  font-size: 0.84rem; line-height: 1.5; color: #92400E;
  background: #FFFBEB; border: 1.5px dashed #F59E0B; border-radius: 10px; padding: 0.5rem 0.7rem;
}
.hiw-page .map-detour svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #D97706; }
.hiw-page .hiw-jump a.is-map .hiw-jump-num { background: linear-gradient(135deg, #34D399, #10B981, #047857); }
.hiw-page .hiw-jump-num svg { width: 22px; height: 22px; }

/* ── Illustration motion ── */
.hiw-page .hiw-tap { animation: hiwTap 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hiw-page .hiw-scan { animation: hiwScan 3.2s linear infinite; }
.hiw-page .hiw-dash { stroke-dasharray: 5 5; animation: hiwDash 1.2s linear infinite; }
.hiw-page .hiw-blink { animation: hiwBlink 2s ease-in-out infinite; }
.hiw-page .hiw-drop { animation: hiwDrop 2.6s ease-in infinite; }
.hiw-page .hiw-rise { animation: hiwRise 3s ease-in-out infinite; }

@keyframes hiwPulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); } 70% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
@keyframes hiwFlow { 0%, 12% { background: var(--b1, #007BFF); color: #fff; } 22%, 100% { background: var(--bl, #E8F3FF); color: var(--b2, #0057D9); } }
@keyframes hiwTap { 0%, 100% { transform: translate(0, 0); } 45% { transform: translate(-3px, -3px); } 55% { transform: translate(0, 1px) scale(0.94); } }
@keyframes hiwScan { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(96px); opacity: 0; } }
@keyframes hiwDash { to { stroke-dashoffset: -20; } }
@keyframes hiwBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes hiwDrop { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(14px, 26px); opacity: 0; } }
@keyframes hiwRise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes hiwRoad { to { stroke-dashoffset: -19; } }

@media (prefers-reduced-motion: reduce) {
  .hiw-page *, .hiw-page *::before, .hiw-page *::after { animation: none !important; transition: none !important; }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .hiw-page .hiw-steps.is-four { grid-template-columns: repeat(2, 1fr); }
  .hiw-page .hiw-steps.is-four > li:nth-child(2n) .hiw-arrow { display: none; }
  .hiw-page .hiw-feats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .hiw-page .hiw-hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hiw-page .hiw-jump { grid-template-columns: 1fr; }
  .hiw-page .map-stop, .hiw-page .map-cap { grid-template-columns: 1fr 110px 1fr; column-gap: 1rem; }
  .hiw-page .map-place em { font-size: 0.85rem; }
  .hiw-page .hiw-mock { max-width: 520px; width: 100%; margin: 0 auto; }
  .hiw-page .hiw-steps.is-six { grid-template-columns: repeat(2, 1fr); }
  .hiw-page .hiw-steps.is-six > li:nth-child(3n) .hiw-arrow { display: grid; }
  .hiw-page .hiw-steps.is-six > li:nth-child(2n) .hiw-arrow { display: none; }
  .hiw-page .hiw-timeline { grid-template-columns: 1fr; gap: 0; max-width: 560px; margin: 0 auto; }
  .hiw-page .hiw-timeline::before { left: 31px; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; background: linear-gradient(180deg, var(--hiw-purple), var(--hiw-blue), var(--hiw-green), var(--g1, #F59E0B), var(--hiw-blue)); }
  .hiw-page .hiw-tl { display: grid; grid-template-columns: 64px 1fr; column-gap: 1rem; text-align: left; padding: 0 0 1.5rem; }
  .hiw-page .hiw-tl-icon { grid-row: span 3; margin: 0; }
  .hiw-page .hiw-tl-time { justify-self: start; }
  .hiw-page .hiw-tl h3 { margin-top: 0.35rem; }
}
@media (max-width: 700px) {
  .hiw-page .hiw-hero { padding-top: 104px; }
  .hiw-page .hiw-jump { grid-template-columns: 1fr; }
  .hiw-page .hiw-steps.is-four, .hiw-page .hiw-steps.is-six { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 2.25rem; }
  /* single column: the arrow points down between cards */
  .hiw-page .hiw-steps > li .hiw-arrow,
  .hiw-page .hiw-steps.is-four > li:nth-child(2n) .hiw-arrow,
  .hiw-page .hiw-steps.is-six > li:nth-child(2n) .hiw-arrow,
  .hiw-page .hiw-steps.is-six > li:nth-child(3n) .hiw-arrow { display: grid; top: auto; right: auto; bottom: -32px; left: 50%; transform: translateX(-50%) rotate(90deg); }
  .hiw-page .hiw-feats { grid-template-columns: 1fr 1fr; }
  .hiw-page .hiw-note { grid-template-columns: 1fr; text-align: left; padding: 1.5rem 1.25rem; gap: 1rem; }
  .hiw-page .hiw-note-icon { width: 64px; height: 72px; }
  .hiw-page .hiw-note-p { padding-left: 0; }
  .hiw-page .hiw-part, .hiw-page .hiw-day { padding: 3.5rem 0; }
  /* map: road on the left, every card on the right */
  .hiw-page .map { padding: 1rem 0.75rem; border-radius: 20px; }
  .hiw-page .map-side { width: 100%; }
  .hiw-page .map-compass { display: none; }
  .hiw-page .map-key { width: 100%; grid-template-columns: 1fr 1fr; }
  .hiw-page .map-key strong { grid-column: 1 / -1; }
  .hiw-page .map-stop, .hiw-page .map-cap { grid-template-columns: 56px 1fr; column-gap: 0.6rem; }
  .hiw-page .map-stop[data-side="r"], .hiw-page .map-stop[data-side="l"] { grid-template-areas: "road card"; min-height: 0; }
  .hiw-page .map-cap { height: 48px; }
  .hiw-page .map-cap .map-mid { grid-area: 1 / 1; }
  .hiw-page .map-place { display: none; }
  .hiw-page .map-stop[data-side="r"] .map-card, .hiw-page .map-stop[data-side="l"] .map-card { justify-self: stretch; max-width: none; margin: 0.7rem 0; }
  .hiw-page .map-stop[data-side="l"] .map-card::before { left: -7px; right: auto; border: 0; border-left: 1px solid var(--hiw-line); border-bottom: 1px solid var(--hiw-line); }
  .hiw-page .map-road .r-edge { stroke-width: 24; }
  .hiw-page .map-road .r-body { stroke-width: 19; }
  .hiw-page .map-road .r-line { stroke-width: 2; stroke-dasharray: 7 7; }
  .hiw-page .map-pin { width: 36px; height: 36px; font-size: 0.88rem; border-width: 3px; }
  .hiw-page .map-sign { left: 50% !important; font-size: 0.66rem; padding: 0.25rem 0.5rem; }
}
@media (max-width: 460px) {
  .hiw-page .hiw-wrap { padding: 0 1rem; }
  .hiw-page .hiw-lang-box { display: flex; }
  .hiw-page .hiw-lang { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hiw-page .hiw-lang button { padding: 0.6rem 0.4rem; font-size: 0.95rem; }
  .hiw-page .hiw-feats { grid-template-columns: 1fr; }
  .hiw-page .hiw-mock { padding: 1.1rem; }
}
