/* six-rules.css · kantawee.com/6-rules.html (6 กฎเหล็ก lead magnet) · navy + lime (CI v1 Leverage family). Pairs with six-rules.js. */
.sr {
    --sr-navy: #0c1d33; --sr-navy-2: #102b49; --sr-navy-3: #1e466b; --sr-ink: #15314a; --sr-muted: #596b7b;
    --sr-line: #d8dfe4; --sr-paper: #f7f6f3; --sr-lime: #d7ff3a; --sr-lime-ink: #4f6000; --sr-lime-tint: #f6ffd4;
    --sr-gold-soft: #e2c58f; --sr-gold-ink: #7a5c2e; --sr-bad: #b42318; --sr-bad-tint: #fdeceb;
}
.sr .sr-narrow { max-width: 48rem; }
.sr .sr-h2 { margin: 0 0 14px; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.35; color: var(--sr-navy); }
.sr .sr-intro p { color: var(--sr-ink); }

/* ---------- hero + pipeline ---------- */
.sr .sr-hero { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 900px) { .sr .sr-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.sr .sr-hero__text { max-width: 40rem; }
.sr-pipe { position: relative; margin: 0; padding: 22px 18px; border: 1px solid rgba(247, 246, 243, .14); border-radius: 24px; background: rgba(255, 255, 255, .04); }
.sr-pipe ol { position: relative; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.sr-pipe ol::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: repeating-linear-gradient(180deg, rgba(215, 255, 58, .55) 0 6px, transparent 6px 12px); }
.sr-pipe li { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; align-items: center; color: #f7f6f3; }
.sr-pipe li b { font-size: 1.02rem; line-height: 1.3; }
.sr-pipe li small { grid-column: 2; color: #a3b1c2; font-size: .86rem; }
.sr-pipe__ic { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--sr-navy-2); border: 1.5px solid rgba(226, 197, 143, .45); }
.sr-pipe__ic svg { width: 26px; height: 26px; fill: none; stroke: var(--sr-gold-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-pipe__ic--on { background: var(--sr-lime); border-color: var(--sr-lime); }
.sr-pipe__ic--on svg { stroke: var(--sr-navy); }
.sr-pipe__dot { position: absolute; left: 40px; top: 46px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--sr-lime); box-shadow: 0 0 0 6px rgba(215, 255, 58, .18); animation: sr-travel 4.8s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes sr-travel { 0%, 8% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 92%, 100% { transform: translateY(var(--sr-travel, 210px)); opacity: 0; } }
.rm .sr-pipe__dot { animation: none; display: none; }
.sr-pipe li { opacity: 1; }
.js .sr-pipe li { opacity: 0; transform: translateX(-10px); transition: opacity .5s ease, transform .5s ease; }
.js .sr-pipe.in li, .js .in .sr-pipe li, .rm .sr-pipe li { opacity: 1; transform: none; }
.js .sr-pipe li:nth-child(2) { transition-delay: .15s; } .js .sr-pipe li:nth-child(3) { transition-delay: .3s; } .js .sr-pipe li:nth-child(4) { transition-delay: .45s; }

/* ---------- intro ---------- */
.sr-example-tag { display: grid; gap: 4px; margin: 22px 0; padding: 16px 18px; border-left: 4px solid var(--sr-lime); border-radius: 0 14px 14px 0; background: var(--sr-lime-tint); }
.sr-example-tag b { color: var(--sr-lime-ink); font-size: .82rem; letter-spacing: .06em; }
.sr-example-tag span { color: var(--sr-navy); font-weight: 700; }
.sr-toc { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: none; }
@media (min-width: 640px) { .sr-toc { grid-template-columns: 1fr 1fr; } }
.sr-toc a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1.5px solid var(--sr-line); border-radius: 14px; background: #fff; color: var(--sr-navy); font-weight: 700; text-decoration: none; }
.sr-toc a:hover, .sr-toc a:focus-visible { border-color: var(--sr-navy); background: var(--sr-lime-tint); }
.sr-toc a span { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sr-navy); color: var(--sr-lime); font-size: .9rem; }
html:not(.sr-open) .sr-toc a[data-lock-link]::after { content: ""; margin-left: auto; width: 14px; height: 14px; flex: none; background: currentColor; opacity: .45;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V7a6 6 0 0 1 12 0v3h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1zm3 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V7a6 6 0 0 1 12 0v3h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1zm3 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- rule ---------- */
.sr-rules .sr-narrow { display: grid; gap: clamp(28px, 5vw, 44px); }
.sr-locked { display: grid; gap: clamp(28px, 5vw, 44px); }
.sr-locked[hidden] { display: none; }
.sr-rule, .sr-bonus { scroll-margin-top: 90px; padding: clamp(20px, 4vw, 34px); border: 1px solid var(--sr-line); border-radius: 24px; background: #fff; box-shadow: 0 12px 28px rgba(12, 29, 51, .06); }
.sr-rule:focus { outline: none; }
.sr-rule__n { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--sr-gold-ink); font-size: .82rem; font-weight: 800; letter-spacing: .1em; }
.sr-rule__n::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sr-lime); box-shadow: 0 0 0 2px var(--sr-navy); }
.sr-rule__h { margin: 0 0 10px; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); line-height: 1.35; color: var(--sr-navy); }
.sr-why { margin: 0 0 18px; color: var(--sr-ink); }

/* example figure */
.sr-ex { margin: 0 0 18px; padding: 16px; border-radius: 18px; background: var(--sr-paper); }
.sr-ex figcaption { margin: 0 0 10px; color: var(--sr-muted); font-size: .82rem; font-weight: 800; letter-spacing: .08em; }
.sr-vs { display: grid; gap: 10px; }
@media (min-width: 640px) { .sr-vs { grid-template-columns: 1fr 1fr; } }
.sr-vs > div { padding: 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--sr-line); }
.sr-vs__good { border-color: var(--sr-navy) !important; }
.sr-vs p { margin: 8px 0 4px; color: var(--sr-navy); font-weight: 700; }
.sr-vs small, .sr-book small { color: var(--sr-muted); }
.sr-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.sr-pill--good { background: var(--sr-lime); color: var(--sr-navy); }
.sr-pill--bad { background: var(--sr-bad-tint); color: var(--sr-bad); }

.sr-books { display: grid; gap: 10px; }
.sr-book { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; align-items: stretch; padding: 14px; border-radius: 14px; background: #fff; }
.sr-book b { display: block; margin-bottom: 8px; color: var(--sr-navy); }
.sr-book__spine { border-radius: 4px; }
.sr-book__spine--a { background: linear-gradient(180deg, #e2c58f, #b99559); }
.sr-book__spine--b { background: linear-gradient(180deg, #1e466b, #0c1d33); }
.sr-meter { display: block; height: 10px; margin-bottom: 6px; border-radius: 999px; background: var(--sr-line); overflow: hidden; }
.sr-meter i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--sr-gold-soft); transform-origin: left; }
.sr-meter--good i { background: var(--sr-lime); box-shadow: inset 0 0 0 1px rgba(12, 29, 51, .2); }
.js .sr-meter i { transform: scaleX(0); transition: transform 1s cubic-bezier(.22, 1, .36, 1) .2s; }
.js .in .sr-meter i, .js .sr-ex.in .sr-meter i, .rm .sr-meter i, .sr-open .sr-meter i { transform: scaleX(1); }

.sr-kcard { display: grid; gap: 8px; margin: 0; }
@media (min-width: 640px) { .sr-kcard { grid-template-columns: 1fr 1fr; } .sr-kcard > div:first-child { grid-column: 1 / -1; } }
.sr-kcard > div { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px dashed var(--sr-line); }
.sr-kcard > div.is-you { border: 1.5px solid var(--sr-navy); background: var(--sr-lime-tint); }
.sr-kcard dt { margin-bottom: 2px; color: var(--sr-gold-ink); font-size: .8rem; font-weight: 800; }
.sr-kcard dd { margin: 0; color: var(--sr-navy); font-weight: 600; }
.sr-credit { margin: 10px 0 0; color: var(--sr-muted); font-size: .86rem; }

.sr-flow { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
@media (min-width: 640px) { .sr-flow { grid-template-columns: 1fr 1.4fr 1fr; } }
.sr-flow li { position: relative; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--sr-line); }
.sr-flow li:nth-child(2) { background: var(--sr-navy); border-color: var(--sr-navy); }
.sr-flow li:nth-child(2) b { color: var(--sr-lime); } .sr-flow li:nth-child(2) span { color: #e6e8ea; }
.sr-flow b { display: block; color: var(--sr-navy); font-size: .9rem; } .sr-flow span { color: var(--sr-ink); font-size: .95rem; }
.sr-chat { display: grid; gap: 8px; max-width: 30rem; }
.sr-chat p { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: .96rem; line-height: 1.55; }
.sr-chat__in { justify-self: start; background: #fff; border: 1px solid var(--sr-line); border-bottom-left-radius: 4px; color: var(--sr-navy); }
.sr-chat__out { justify-self: end; background: var(--sr-navy); color: #f7f6f3; border-bottom-right-radius: 4px; }
.sr-chat__tag { display: block; margin-bottom: 4px; color: var(--sr-lime); font-size: .76rem; font-weight: 800; }
.js .sr-chat__out { opacity: 0; transform: translateY(8px); transition: opacity .5s ease .5s, transform .5s ease .5s; }
.js .in .sr-chat__out, .js .sr-open .sr-chat__out, .rm .sr-chat__out, .sr-open .sr-chat__out { opacity: 1; transform: none; }

.sr-test { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: .95rem; }
.sr-test th, .sr-test td { padding: 10px 12px; border-bottom: 1px solid var(--sr-line); text-align: left; vertical-align: top; color: var(--sr-navy); }
.sr-test th { color: var(--sr-muted); font-size: .8rem; }
.sr-test td:last-child, .sr-test th:last-child { width: 1%; text-align: right; }
.sr-test tr.is-fail td { background: var(--sr-bad-tint); }
.sr-test small { display: block; margin-top: 4px; color: var(--sr-ink); font-size: .86rem; }

.sr-offer { margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: #fff; color: var(--sr-navy); font-size: 1.08rem; font-weight: 700; line-height: 1.6; }
.sr-offer u { text-decoration-color: var(--sr-lime); text-decoration-thickness: 4px; text-underline-offset: 3px; }
.sr-cost { display: grid; gap: 8px; }
.sr-cost__bar { position: relative; height: 26px; border-radius: 999px; background: #fff; border: 1px solid var(--sr-line); overflow: hidden; }
.sr-cost__fill { position: absolute; inset: 0 auto 0 0; width: 20%; background: var(--sr-lime); }
.sr-cost__cap { position: absolute; left: calc(20% + 8px); top: 50%; transform: translateY(-50%); color: var(--sr-navy); font-size: .8rem; font-weight: 800; }
.sr-cost p { margin: 0; color: var(--sr-ink); }
.sr-cost small { color: var(--sr-muted); }

/* prompt block */
.sr-prompt { margin: 0 0 18px; border-radius: 16px; background: var(--sr-navy); overflow: hidden; }
.sr-prompt__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(247, 246, 243, .12); color: var(--sr-lime); font-size: .82rem; font-weight: 800; letter-spacing: .06em; }
.sr-copy { min-height: 40px; min-width: 88px; padding: 6px 14px; border: 1.5px solid rgba(247, 246, 243, .45); border-radius: 999px; background: transparent; color: #f7f6f3; font: inherit; font-weight: 700; letter-spacing: 0; cursor: pointer; }
.sr-copy:hover, .sr-copy:focus-visible { background: var(--sr-lime); border-color: var(--sr-lime); color: var(--sr-navy); outline: none; }
.sr-copy.is-done { background: var(--sr-lime); border-color: var(--sr-lime); color: var(--sr-navy); }
.sr-prompt pre { margin: 0; padding: 14px 16px 16px; max-height: 22rem; overflow: auto; white-space: pre-wrap; word-break: break-word; color: #f7f6f3; font: 500 .95rem/1.7 var(--font-body, "Inter", "Noto Sans Thai", sans-serif); }

/* checklist */
.sr-check { display: grid; gap: 6px; margin: 0; padding: 14px 16px; border: 1.5px solid var(--sr-line); border-radius: 16px; }
.sr-check legend { padding: 0 6px; color: var(--sr-navy); font-weight: 800; }
.sr-check label { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; min-height: 40px; padding: 6px 0; cursor: pointer; color: var(--sr-ink); }
.sr-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--sr-navy); }
.sr-check input:checked + span { color: var(--sr-muted); text-decoration: line-through; text-decoration-color: var(--sr-lime-ink); }

/* ---------- gate ---------- */
.sr-gate { position: relative; scroll-margin-top: 90px; }
.sr-gate__locked { display: grid; gap: 10px; margin-bottom: -60px; padding: 4px 6px 80px; filter: blur(3px); opacity: .55; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); pointer-events: none; user-select: none; }
.sr-gate__locked span { padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--sr-line); color: var(--sr-navy); font-weight: 800; }
.sr-gate__card { position: relative; display: grid; gap: 10px; }
.sr-gate__card form { display: grid; gap: 12px; }
.sr-gate__badge { display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--sr-lime); color: var(--sr-navy); font-size: .85rem; font-weight: 800; }
.sr-gate__badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.sr-gate__h { margin: 0; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); color: var(--sr-navy); }
.sr-gate[hidden] { display: none; }

/* ---------- skill card ---------- */
.sr-sc { display: grid; gap: 16px; }
@media (min-width: 900px) { .sr-sc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .sr-sc__out { position: sticky; top: 90px; } }
.sr-sc__form { display: grid; gap: 10px; }
.sr-sc__form label { display: grid; gap: 4px; }
.sr-sc__form span { color: var(--sr-navy); font-size: .88rem; font-weight: 700; }
.sr-sc__form input, .sr-sc__form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--sr-line); border-radius: 12px; background: #fff; color: var(--sr-navy); font: inherit; font-size: 1rem; }
.sr-sc__form textarea { resize: vertical; line-height: 1.6; }
.sr-sc__form input:focus, .sr-sc__form textarea:focus { border-color: var(--sr-navy); outline: 3px solid var(--sr-lime); outline-offset: 0; }
.sr-sc__form ::placeholder { color: #8a99a8; }
.sr-prompt--dark { margin: 0; }

/* ---------- 7 days ---------- */
.sr-days { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sr-days li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--sr-paper); }
.sr-days b { color: var(--sr-navy); } .sr-days span { color: var(--sr-ink); }
.sr-days li:last-child { background: var(--sr-lime-tint); }

.sr-pdf { display: grid; justify-items: center; gap: 6px; text-align: center; }
.sr-pdf small { color: var(--sr-muted); }

/* ---------- next ---------- */
.sr-next[hidden] { display: none; }
.sr-next__card { padding: clamp(24px, 5vw, 44px); border-radius: 28px; background: var(--sr-navy); color: #f7f6f3; }
.sr-next__card h2 { margin: 6px 0 10px; color: #f7f6f3; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.35; }
.sr-next__card p { margin: 0 0 20px; color: #d5dce3; }
.sr-next__card .kicker { color: var(--sr-gold-soft); }

@media (max-width: 480px) {
    .sr-rule, .sr-bonus { border-radius: 18px; }
    .sr-days li { grid-template-columns: 1fr; gap: 2px; }
    .sr-test { font-size: .9rem; }
}
