/* Right to work checks: the checklist document (doc-rtw.php), the peeling stack of the three ways to check and the
   share-code demo (set-rtw.php), and the two-plan layout. */

/* ---------- Opener document ---------- */
.doc--rtw { border-left-color: var(--claret); }
.doc--rtw .doc__head b { font-family: var(--sans); font-weight: 700; font-size: .82rem; padding: 3px 8px; background: var(--highlight); color: var(--ink); align-self: center; }
.doc--rtw .doc__stamp { width: 134px; }
.doc--rtw .doc__stamp span { font-size: 1.18rem; }
.doc--rtw .doc__stamp small { font-size: .56rem; letter-spacing: .08em; }
@media (max-width: 560px) { .doc--rtw .doc__stamp { width: 112px; } .doc--rtw .doc__stamp span { font-size: 1rem; } }

/* ---------- Set piece row 1: the three ways, as a stack that peels ---------- */
.rw { overflow: clip; }
.rw__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(117,21,35,.06) 35px, rgba(117,21,35,.06) 36px); animation: so-drift-36 24s linear infinite; }
.rw__ruling::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(20px, 4.4vw, 70px); width: 1px; background: rgba(163,24,62,.35); }
.rw__peel, .rw__demo { position: relative; }
.rw__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(26px, 3vw, 44px); }
.rw__copy h2 { margin-bottom: 16px; }
.rw__copy .lede { margin-bottom: 0; }
.rw__index { display: none; margin: 28px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.rw__index li { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 700; font-size: 1.1rem; color: var(--ink-soft); transition: color .4s; }
.rw__index li::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--claret); transition: background-color .4s, transform .4s var(--ease); }
.rw__index li.is-on { color: var(--ink); }
.rw__index li.is-on::before { background: var(--crimson); border-color: var(--crimson); transform: scale(1.3); }
.rw__index li.is-done { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(163,24,62,.5); }
.rw__index li.is-done::before { background: var(--claret); }

.rw__stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); margin: 0; padding: 0; list-style: none; }
.rw__card { position: relative; display: flex; flex-direction: column; padding: 26px 26px 24px; background: #fff; color: var(--ink); border-top: 4px solid var(--crimson); box-shadow: 0 28px 60px rgba(34,9,15,.18), 0 2px 0 rgba(34,9,15,.04); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #F4EBED 31px, #F4EBED 32px); background-position: 0 18px; }
.rw__card--code { border-top-color: var(--highlight); }
.rw__card--id { border-top-color: var(--ink-blue); }
.rw__card p { margin: 0; }
.rw__ctop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rw__icon { width: 44px; height: 44px; fill: none; stroke: var(--crimson); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rw__pos { font-weight: 700; font-size: 1.5rem; line-height: 1; color: var(--claret); }
.rw__pos span { font-size: .95rem; color: var(--ink-soft); }
.rw__title { font-family: var(--serif); font-size: clamp(1.5rem, 2vw, 1.9rem); line-height: 1.12; margin-bottom: 10px !important; text-wrap: balance; }
.rw__who { display: inline-block; align-self: flex-start; padding: 4px 10px; background: var(--blush); font-size: .95rem; margin-bottom: 14px !important; }
.rw__who b { color: var(--crimson); }
.rw__how { color: var(--ink-soft); margin-bottom: 16px !important; }
.rw__pts { display: grid; gap: 8px; margin: auto 0 0; padding: 14px 0 0; list-style: none; border-top: 1px dashed var(--rule); }
.rw__pts li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .98rem; }
.rw__pts svg { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--crimson); color: #fff; }

/* Pinned mode (JS): copy and contents left, the cards stacked right */
.rw-pin.rw { padding-top: 0; }
.rw-pin .rw__peel { min-height: 100vh; display: grid; align-items: center; padding: calc(var(--head-h) + 24px) 0 32px; }
.rw-pin .rw__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 110px); align-items: center; }
.rw-pin .rw__index { display: block; }
.rw-pin .rw__stackwrap { position: relative; perspective: 1600px; }
.rw-pin .rw__stack { display: block; position: relative; height: min(460px, 62vh); }
.rw-pin .rw__card { position: absolute; inset: 0 0 auto 0; height: min(420px, 58vh); overflow: hidden; transform-origin: 20% 0%; will-change: transform; }

/* ---------- Set piece row 2: the share code demo ---------- */
.rw__demo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 90px); align-items: center; margin-top: clamp(56px, 7vw, 96px); }
.rw-pin .rw__demo { margin-top: clamp(24px, 4vw, 60px); }
.rw__dh { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.3vw, 2.2rem); line-height: 1.12; margin-bottom: 14px; }
.rw__democopy p { color: var(--ink-soft); }
.rw__dnote { display: inline-block; padding: 4px 10px; border-left: 3px solid var(--highlight); background: var(--blush); font-weight: 600; font-size: .95rem; color: var(--ink) !important; }
.rw__window { position: relative; background: #fff; border: 1px solid var(--rule); box-shadow: 0 30px 70px rgba(34,9,15,.18); }
.rw__wbar { display: flex; align-items: center; gap: 7px; margin: 0; padding: 12px 16px; background: var(--ink-blue); color: #fff; font-weight: 700; font-size: .95rem; }
.rw__wbar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.3); }
.rw__wbar i:first-child { background: var(--crimson); }
.rw__wbar span { margin-left: 10px; }
.rw__wbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 24px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #F4EBED 31px, #F4EBED 32px); }
.rw__fields { display: grid; gap: 14px; align-content: start; }
.rw__field { position: relative; display: grid; gap: 4px; }
.rw__field span { font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
.rw__field b { display: block; min-height: 52px; padding: 12px 14px; border: 2px solid var(--ink); background: #fff; font-weight: 700; font-size: 1.25rem; letter-spacing: .08em; line-height: 1.2; white-space: nowrap; }
.rw__field.is-typing b::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -3px; background: var(--crimson); animation: rw-blink .8s steps(1) infinite; }
@keyframes rw-blink { 50% { opacity: 0; } }
.rw__field.is-typing b { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(163,24,62,.15); }
.rw__btn { justify-self: start; display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border-radius: var(--btn-r); background: var(--crimson); color: #fff; font-weight: 700; }
.rw__rslot { position: relative; align-self: start; min-height: 150px; border: 2px dashed #DCCBD0; background: rgba(255,255,255,.7); }
.rw__wait { margin: 0; padding: 18px; color: var(--ink-soft); font-size: .95rem; }
.rw__result { position: absolute; inset: -2px; display: flex; gap: 16px; align-items: flex-start; padding: 18px; border: 2px solid #2F7A4B; background: #F1F8F3; }
.rw__rphoto { position: relative; flex: none; width: 64px; height: 80px; background: #DCE9E0; overflow: hidden; }
.rw__rphoto::before { content: ''; position: absolute; left: 50%; top: 14px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: #9DBBA6; }
.rw__rphoto::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 52px; height: 36px; margin-left: -26px; border-radius: 50% 50% 0 0; background: #9DBBA6; }
.rw__rtext p { margin: 0; }
.rw__rk { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: #1F5A35; }
.rw__rk svg { flex: none; width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: #2F7A4B; color: #fff; }
.rw__rv { margin-top: 6px !important; color: var(--ink-soft); font-size: .98rem; }
.rw__rv b { color: var(--ink); }
.rw__stamp { position: absolute; right: -18px; bottom: -40px; width: 120px; height: 74px; display: grid; place-content: center; text-align: center; border: 3px solid var(--crimson); outline: 1.5px solid var(--crimson); outline-offset: -8px; border-radius: 50%; color: var(--crimson); background: rgba(255,255,255,.92); transform: rotate(-12deg); }
.rw__stamp span { font-family: var(--serif); font-size: 1.15rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.rw__stamp small { font-weight: 700; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 1100px) {
  .rw__wbody { grid-template-columns: minmax(0, 1fr); }
  .rw__rslot { margin-bottom: 30px; }
}
@media (max-width: 960px) {
  .rw__stack { grid-template-columns: minmax(0, 1fr); }
  .rw__demo { grid-template-columns: minmax(0, 1fr); }
  .rw-pin .rw__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .rw-pin .rw__peel { padding-top: calc(var(--head-h) + 16px); }
  .rw-pin .rw__index { display: none; }
  .rw-pin .rw__stack { height: 430px; }
  .rw-pin .rw__card { height: 400px; }
}
@media (max-width: 560px) {
  .rw__ruling::before { display: none; }
  .rw__card { padding: 20px 18px 18px; }
  .rw-pin .rw__copy .lede { font-size: 1rem; }
  .rw-pin .rw__stack { height: 360px; }
  .rw-pin .rw__card { height: 336px; }
  .rw-pin .rw__pts { display: none; }
  .rw-pin .rw__copy h2 { margin-bottom: 10px; }
  .rw__wbody { padding: 16px; }
  .rw__field b { font-size: 1.1rem; }
  .rw__stamp { right: 6px; bottom: -44px; width: 104px; height: 64px; }
}
.page-rtw .sp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .page-rtw .sp__grid { grid-template-columns: minmax(0, 1fr); } }
