/* ==========================================================================
   tools.css — halaman /tools/ (Fasa 5, pautan bio medsos). Token, kepala & kaki
   datang daripada /kedai/kedai.css. Mudah alih DAHULU: kad = satu baris (ikon +
   nama + subtajuk + harga/tag); deskripsi hanya muncul >= 600px (Hick's Law —
   telefon mengimbas nama, bukan perenggan). 1 lajur → 2 (600px) → 3 (1024px).
   ========================================================================== */
.tl-main { padding-top: 14px; padding-bottom: 28px; max-width: 1180px; }
@media (max-width: 899px) { .tl-main { padding-left: 12px; padding-right: 12px; } }
html { scroll-padding-top: calc(var(--kepala-h) + 64px); }

/* ---- Hero ---- */
.tl-hero { text-align: center; padding: 22px 8px 18px; }
.tl-hero-lencana { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: var(--radius-full); background: var(--primary-bg); color: var(--primary-text); font-weight: 700; font-size: .85em; border: 1px solid var(--primary-bd); }
.tl-hero h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 6vw, 2.5rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.tl-hero-p { margin: 0 auto 18px; max-width: 560px; color: var(--text-muted); font-size: 1.05em; line-height: 1.55; }
.tl-hero-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tl-cta { min-width: 220px; justify-content: center; font-size: 1.05em; padding: 13px 22px; }
.tl-cta-2 { color: var(--primary-text); font-weight: 600; text-decoration: none; padding: 6px; }
.tl-cta-2:hover { text-decoration: underline; }
.tl-fakta { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 18px 0 0; padding: 0; color: var(--text-muted); font-size: .9em; }
.tl-fakta b { color: var(--text); }

/* ---- Cara mendapatkan (hanya bila jualan hidup) ---- */
.tl-cara { margin: 4px 0 18px; }
.tl-cara-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl-cara-grid li { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); display: flex; flex-direction: column; gap: 3px; }
.tl-cara-grid li.utama { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.tl-cara-grid b { color: var(--text); }
.tl-cara-grid span { color: var(--text-muted); font-size: .92em; }
.tl-cara-grid a { color: var(--primary-text); font-weight: 600; }
@media (min-width: 700px) { .tl-cara-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Navigasi: carian + cip kumpulan (melekat di bawah kepala) ---- */
.tl-nav { position: sticky; top: var(--kepala-h); z-index: 30; background: var(--bg); padding: 10px 0 8px; margin: 0 0 6px; border-bottom: 1px solid var(--border); }
.tl-nav input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.tl-nav input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.tl-cip { list-style: none; display: flex; gap: 6px; margin: 8px 0 0; padding: 0 0 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tl-cip::-webkit-scrollbar { display: none; }
.tl-cip a { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; height: 34px; padding: 0 12px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9em; }
.tl-cip a small { color: var(--text-light); font-weight: 500; }
.tl-cip a.aktif { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.tl-cip a.aktif small { color: rgba(255,255,255,.8); }
@media (min-width: 1024px) { .tl-cip { flex-wrap: wrap; overflow: visible; } }
.tl-kosong { text-align: center; color: var(--text-muted); padding: 30px 10px; }

/* ---- Kumpulan & bidang ---- */
.tl-kump { margin: 18px 0 8px; }
.tl-kump h2 { font-size: 1.2em; font-weight: 800; margin: 0 0 10px; color: var(--text); }
.tl-kump h2 small { font-weight: 600; color: var(--text-light); font-size: .75em; }
.tl-bidang h3 { font-size: .8em; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 14px 0 8px; }
.tl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 600px) { .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 1024px) { .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- Kad tool ---- */
.tl-kad { --tka: #2563eb; --tkb: #60a5fa; display: flex; scroll-margin-top: calc(var(--kepala-h) + 110px); }
.tl-kad[data-warna="b"] { --tka: #7c3aed; --tkb: #a78bfa; }
.tl-kad[data-warna="c"] { --tka: #0f766e; --tkb: #2dd4bf; }
.tl-kad[data-warna="d"] { --tka: #be123c; --tkb: #fda4af; }
.tl-kad[data-warna="e"] { --tka: #c2410c; --tkb: #fdba74; }
.tl-kad[data-warna="f"] { --tka: #4338ca; --tkb: #a5b4fc; }
.tl-kad[data-warna="g"] { --tka: #475569; --tkb: #cbd5e1; }
.tl-kad { position: relative; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.tl-kad:hover { border-color: var(--tka); box-shadow: var(--shadow); }
.tl-kad:focus-within { outline: 3px solid var(--tka); outline-offset: 2px; }
.tl-kad:target { border-color: var(--tka); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tka) 35%, transparent); }
.tl-utama { color: inherit; text-decoration: none; outline: none; }
.tl-utama::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }   /* seluruh kad boleh diketik */
.tl-kanan { display: inline-flex; align-items: center; gap: 12px; }
.tl-panduan { position: relative; z-index: 1; color: var(--text-muted); font-size: .85em; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; padding: 6px 2px; }
.tl-panduan:hover { color: var(--tka); }
.tl-ikon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--tka), color-mix(in srgb, var(--tka) 70%, #000)); }
.tl-ikon svg { width: 30px; height: 30px; display: block; overflow: visible; }
.tl-ikon .tk-a { fill: #fff; }
.tl-ikon .tk-a2 { fill: var(--tkb); }
.tl-ikon .tk-b { fill: var(--tka); stroke: var(--tka); stroke-width: 1.6; }
.tl-ikon .tk-c { fill: none; stroke: var(--tkb); stroke-width: 2; stroke-linecap: round; }
.tl-kad[data-warna="c"] .tl-ikon .tk-b { fill: none; stroke: var(--tka); stroke-width: 1.8; }
.tl-kad[data-warna="c"] .tl-ikon path.tk-a[style] { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tl-isi { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tl-nama { font-weight: 700; line-height: 1.3; }
.tl-sub { color: var(--text-muted); font-size: .9em; line-height: 1.35; }
.tl-desk { display: none; color: var(--text-muted); font-size: .88em; line-height: 1.45; margin-top: 4px; }
@media (min-width: 600px) { .tl-desk { display: block; } .tl-kad { padding: 14px; } }
.tl-bawah { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tl-aksi { color: var(--tka); font-weight: 700; font-size: .88em; white-space: nowrap; }
.tl-tag { display: inline-block; padding: 2px 8px; border-radius: var(--radius-full); font-size: .78em; font-weight: 700; }
.tl-tag.hijau { background: var(--primary-bg); color: var(--primary-text); }
.tl-tag.ungu { background: #f5f3ff; color: #6d28d9; }
:root[data-theme="dark"] .tl-tag.ungu { background: #2e1065; color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-tag.ungu { background: #2e1065; color: #c4b5fd; } }
.tl-harga { font-weight: 800; color: var(--text); }
.tl-harga small { font-weight: 500; color: var(--text-light); }

/* ---- Pakej ---- */
.tl-pakej { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 600px) { .tl-pakej { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tl-pakej { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tl-pakej a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 1px solid var(--primary-bd); border-radius: var(--radius-md); background: var(--primary-bg); color: var(--text); text-decoration: none; }
.tl-pakej a:hover { border-color: var(--primary); }
.tl-pakej span:not(.tl-harga) { color: var(--text-muted); font-size: .9em; flex: 1; }

/* ---- Penutup ---- */
.tl-akhir { text-align: center; margin: 30px 0 6px; padding: 24px 16px; border-radius: var(--radius-lg); background: var(--kepala-bg); color: #fff; }
.tl-akhir h2 { margin: 0 0 6px; font-size: 1.35em; }
.tl-akhir p { margin: 0 0 14px; opacity: .9; }
.tl-akhir .kd-btn-utama { background: #fff; color: #047857; }
.tl-akhir .kd-btn-utama:hover { background: #ECFDF5; }
[hidden] { display: none !important; }
/* Telefon: baris bawah kad kekal SATU baris — label tidak berbalut; teks "Cuba sekarang/Lihat & beli"
   diganti anak panah kerana seluruh kad sudah boleh diketik (Hick's Law: kurang teks bersaing). */
.tl-tag, .tl-harga, .tl-panduan, .tl-aksi { white-space: nowrap; }
.tl-bawah { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 599px) {
    .tl-aksi { font-size: 0; }
    .tl-aksi::after { content: '›'; font-size: 22px; line-height: 1; }
}

/* ---- 2026-10: elemen pemasaran (hero manfaat, bukti sebenar, manfaat, kurikulum, FAQ) ---- */
.tl-hero h1 em { font-style: normal; color: var(--primary-text); display: block; }
.tl-bukti { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px auto 0; padding: 0; max-width: 720px; }
.tl-bukti li { flex: 1 1 130px; max-width: 170px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; }
.tl-bukti b { font-size: 1.45em; font-weight: 800; color: var(--text); line-height: 1.1; }
.tl-bukti span { font-size: .82em; color: var(--text-muted); }
.tl-manfaat { display: grid; gap: 10px; margin: 6px 0 22px; }
.tl-manfaat > div { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; row-gap: 2px; padding: 14px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--border); }
.tl-m-ikon { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-bg); color: var(--primary-text); display: flex; align-items: center; justify-content: center; }
.tl-m-ikon svg { width: 22px; height: 22px; }
.tl-manfaat b { color: var(--text); }
.tl-manfaat span:not(.tl-m-ikon) { color: var(--text-muted); font-size: .92em; line-height: 1.45; }
@media (min-width: 800px) { .tl-manfaat { grid-template-columns: repeat(3, 1fr); } }
.tl-kump h2 small { font-weight: 500; }
.tl-kurikulum { margin: 30px 0 8px; text-align: center; }
.tl-kurikulum h2 { font-size: 1.2em; font-weight: 800; margin: 0 0 12px; }
.tl-kurikulum ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.tl-kurikulum li { padding: 6px 12px; border-radius: var(--radius-full); background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: .9em; }
.tl-faq { margin: 30px auto 8px; max-width: 820px; }
.tl-faq h2 { font-size: 1.2em; font-weight: 800; margin: 0 0 12px; text-align: center; }
.tl-faq details { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius-md); margin-bottom: 8px; }
.tl-faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; list-style: none; position: relative; }
.tl-faq summary::-webkit-details-marker { display: none; }
.tl-faq summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--primary-text); font-weight: 600; }
.tl-faq details[open] summary::after { content: '−'; }
.tl-faq p { margin: 0; padding: 0 16px 14px; color: var(--text-muted); line-height: 1.55; }
@media (max-width: 599px) {
    .tl-hero { padding-top: 14px; }
    .tl-hero-p { font-size: 1em; }
    .tl-bukti { gap: 6px; margin-top: 16px; }
    .tl-bukti li { flex-basis: calc(50% - 6px); max-width: none; padding: 8px; }
    .tl-manfaat > div { padding: 12px; }
}
@media (max-width: 599px) {
    .tl-manfaat { gap: 6px; margin-bottom: 16px; }
    .tl-manfaat > div { grid-template-columns: 32px 1fr; align-items: center; padding: 10px 12px; }
    .tl-m-ikon { grid-row: auto; width: 32px; height: 32px; border-radius: 10px; }
    .tl-m-ikon svg { width: 18px; height: 18px; }
    .tl-manfaat span:not(.tl-m-ikon) { grid-column: 2; font-size: .85em; }
    .tl-manfaat span:not(.tl-m-ikon) { display: none; }
}
