/* =====================================================================
   RM Click — inner pages (services, journal, legal)
   Built on styles.css: same tokens, tags, buttons, reveal motion, footer.
   ===================================================================== */

/* ---------- page hero (dark shell, like the home hero but shorter) ---------- */
.ph { position: relative; isolation: isolate; overflow: hidden; margin-top: var(--shell); padding-bottom: clamp(50px, 6vw, 110px); }
.ph::before { content: ""; position: absolute; z-index: -1; width: 70vw; height: 70vw; right: -25vw; top: -35vw; border-radius: 50%; background: radial-gradient(circle, rgba(227,52,43,.28), rgba(227,52,43,0) 65%); filter: blur(10px); animation: phGlow 12s var(--ease-io) infinite alternate; }
@keyframes phGlow { to { transform: translate(-8vw, 6vw) scale(1.1); } }
.ph-inner { padding-top: clamp(70px, 8vw, 150px); max-width: 1180px; }
.ph-title { font-size: clamp(40px, 5.2vw, 100px); line-height: 1.03; letter-spacing: -.035em; font-weight: 500; text-wrap: balance; }
.ph-sub { margin-top: clamp(16px, 1.6vw, 28px); max-width: 38em; font-size: clamp(15px, 1.2vw, 21px); line-height: 1.5; color: rgba(255,255,255,.78); }
.ph-ctas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: clamp(22px, 2.2vw, 40px); }
.ph-ctas .btn { height: clamp(44px, 3vw, 54px); padding: 0 clamp(20px, 1.6vw, 28px); }
.ph-ctas .call-btn { height: clamp(44px, 3vw, 54px); }
.muted-w { color: rgba(255,255,255,.45); }

/* article meta row */
.ar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: clamp(22px, 2.2vw, 40px); }
.ar-meta img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ar-meta span { display: flex; flex-direction: column; line-height: 1.25; font-size: 14px; }
.ar-meta small { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.ar-meta b { font-weight: 500; }
.ar-meta .ar-dot { width: 1px; height: 28px; background: rgba(255,255,255,.2); }

/* ---------- article layout ---------- */
.ar { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 720px); justify-content: center; gap: clamp(30px, 5vw, 100px); padding-top: clamp(50px, 5vw, 100px); padding-bottom: clamp(40px, 4vw, 80px); }
.ar-aside { position: sticky; top: 30px; align-self: start; display: grid; gap: 14px; }
.ar-toc { background: var(--gray-bg); border-radius: var(--r-card); padding: 20px 22px; }
.ar-toc small, .ar-help small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.ar-toc ol { margin-top: 12px; display: grid; gap: 2px; counter-reset: toc; }
.ar-toc li { counter-increment: toc; }
.ar-toc a { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; line-height: 1.35; color: var(--text-2); transition: color .25s, transform .4s var(--ease); }
.ar-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: 11px; color: var(--red); padding-top: 2px; }
.ar-toc a:hover, .ar-toc a.is-current { color: var(--black); transform: translateX(3px); }
.ar-help { display: grid; gap: 10px; background: var(--black); color: #fff; border-radius: var(--r-card); padding: 22px; }
.ar-help b { font-weight: 400; font-size: 17px; line-height: 1.35; letter-spacing: -.01em; }
.ar-help .btn { justify-self: start; margin-top: 4px; }

.prose { font-size: clamp(16px, 1.08vw, 18.5px); line-height: 1.72; color: #222; min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(26px, 2vw, 36px); line-height: 1.15; letter-spacing: -.025em; font-weight: 500; margin-top: 2.1em; scroll-margin-top: 30px; color: var(--black); }
.prose h3 { font-size: clamp(19px, 1.35vw, 23px); letter-spacing: -.015em; font-weight: 500; margin-top: 1.6em; color: var(--black); }
.prose p strong, .prose li strong { font-weight: 600; color: var(--black); }
.prose a { color: var(--black); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color .25s; }
.prose a:hover { color: var(--red); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.4em; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 2px; background: var(--red); }
.prose ol { list-style: decimal; }
.prose ol > li::marker { font-family: var(--f-mono); color: var(--red); font-size: .85em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { border-left: 2px solid var(--red); padding: 4px 0 4px 18px; color: var(--text-2); font-size: .95em; }
.prose code { font-family: var(--f-mono); font-size: .84em; background: var(--gray-bg); padding: .12em .4em; border-radius: 5px; overflow-wrap: anywhere; }
.prose pre { background: #0f0f0f; color: #e8e8e8; border-radius: 14px; padding: 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.prose input[type="checkbox"] { accent-color: var(--red); margin-right: 8px; }
.prose li:has(> input[type="checkbox"])::before { display: none; }
.prose li:has(> input[type="checkbox"]) { padding-left: 0; }
.ar-author { display: flex; gap: 16px; align-items: flex-start; margin-top: 3em !important; padding-top: 24px; border-top: 1px solid var(--line); }
.ar-author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.ar-author b { font-weight: 500; }
.ar-author p { font-size: 15px; color: var(--text-2); line-height: 1.55; margin-top: 4px; }
.ar-legal { grid-template-columns: minmax(0, 760px); }

/* ---------- CTA band ---------- */
.pg-cta { padding-top: clamp(20px, 3vw, 60px); padding-bottom: clamp(60px, 6vw, 120px); }
.pg-cta-in { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-shell); padding: clamp(40px, 5vw, 100px) clamp(22px, 4vw, 80px); display: flex; flex-direction: column; align-items: flex-start; }
.pg-cta-in::before { content: ""; position: absolute; z-index: -1; width: 60vw; height: 60vw; right: -20vw; bottom: -40vw; border-radius: 50%; background: radial-gradient(circle, rgba(227,52,43,.35), rgba(227,52,43,0) 65%); }
.pg-cta-in h2 { font-size: clamp(36px, 4.6vw, 88px); line-height: 1.04; letter-spacing: -.035em; font-weight: 400; }
.pg-related { padding-bottom: clamp(50px, 5vw, 100px); }
.pg-faq { border-top: 1px solid var(--line); }

/* ---------- journal index ---------- */
.jr-index { padding-top: clamp(50px, 5vw, 100px); padding-bottom: clamp(30px, 3vw, 60px); }

/* ---------- services ---------- */
.sv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: clamp(26px, 3vw, 56px); }
.sv-head > p { max-width: 28em; font-size: clamp(13px, .95vw, 16px); color: var(--text-2); line-height: 1.6; }
.sv-problems { padding-top: clamp(70px, 7vw, 140px); padding-bottom: clamp(60px, 6vw, 120px); }
.sv-prob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, .9vw, 16px); }
.sv-prob { background: var(--gray-bg); border-radius: var(--r-card); padding: clamp(22px, 2.2vw, 40px); min-height: clamp(180px, 15vw, 260px); display: flex; flex-direction: column; transition: background-color .45s var(--ease), color .45s var(--ease); }
.sv-prob h3 { margin-top: auto; font-size: clamp(22px, 1.9vw, 34px); font-weight: 400; letter-spacing: -.025em; }
.sv-prob p { margin-top: 10px; font-size: clamp(13.5px, .95vw, 16px); color: var(--text-2); line-height: 1.55; max-width: 34em; transition: color .45s; }
.sv-prob:hover { background: var(--black); color: #fff; }
.sv-prob:hover p { color: rgba(255,255,255,.7); }
.sv-n { font-family: var(--f-mono); font-size: 12px; color: var(--red); }

.sv-incl { padding: clamp(60px, 6vw, 120px) 0; }
.sv-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 30em; }
.sv-tools li { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.sv-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.14); }
.sv-list li { display: flex; gap: 16px; padding: clamp(20px, 2vw, 36px) clamp(10px, 1.2vw, 24px) clamp(20px, 2vw, 36px) 0; border-bottom: 1px solid rgba(255,255,255,.14); transition: background-color .4s; }
.sv-list li:not(:nth-child(3n+1)) { padding-left: clamp(14px, 1.4vw, 26px); border-left: 1px solid rgba(255,255,255,.14); }
.sv-list h3 { font-size: clamp(18px, 1.35vw, 24px); font-weight: 400; letter-spacing: -.02em; }
.sv-list p { margin-top: 8px; font-size: clamp(13px, .9vw, 15.5px); color: rgba(255,255,255,.65); line-height: 1.55; }
.sv-list li:hover h3 { color: var(--red); }
.sv-list h3 { transition: color .3s; }

.sv-results { padding-top: clamp(70px, 7vw, 140px); }
.sv-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(10px, .9vw, 16px); }
.sv-case { border-top: 1px solid var(--black); padding-top: clamp(14px, 1.2vw, 22px); }
.sv-case strong { display: block; font-size: clamp(48px, 4.4vw, 86px); font-weight: 400; letter-spacing: -.05em; line-height: .9; }
.sv-case strong i { font-style: normal; color: var(--red); }
.sv-case > span { display: block; margin-top: 12px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--red); }
.sv-case h3 { margin-top: 14px; font-size: clamp(17px, 1.2vw, 21px); font-weight: 500; letter-spacing: -.015em; }
.sv-case p { margin-top: 6px; font-size: clamp(13px, .9vw, 15px); color: var(--text-2); line-height: 1.5; }

.sv-steps { padding-top: clamp(70px, 7vw, 140px); padding-bottom: clamp(40px, 4vw, 80px); }
.sv-step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, .9vw, 16px); counter-reset: st; }
.sv-step-grid li { position: relative; background: var(--gray-bg); border-radius: var(--r-card); padding: clamp(20px, 1.8vw, 32px); min-height: clamp(200px, 16vw, 280px); display: flex; flex-direction: column; overflow: hidden; }
.sv-step-grid li > span { font-size: clamp(48px, 4vw, 76px); letter-spacing: -.05em; line-height: .9; color: var(--red); }
.sv-step-grid h3 { margin-top: auto; font-size: clamp(18px, 1.4vw, 24px); font-weight: 500; letter-spacing: -.02em; }
.sv-step-grid p { margin-top: 8px; font-size: clamp(13px, .9vw, 15px); color: var(--text-2); line-height: 1.5; }
.sv-step-grid li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red); transition: width .8s var(--ease); }
.sv-step-grid li:hover::after { width: 100%; }

.sv-reading { padding-top: clamp(30px, 3vw, 60px); }
.sv-read-in { border-radius: var(--r-card); background: var(--gray-bg); padding: clamp(18px, 1.8vw, 32px); display: grid; gap: 2px; }
.sv-read-in .tag { justify-self: start; background: #fff; }
.sv-read { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid #e2e2e2; font-size: clamp(16px, 1.25vw, 22px); letter-spacing: -.015em; transition: color .3s; }
.sv-read svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--red); stroke-width: 1.6; transition: transform .5s var(--ease); }
.sv-read:hover { color: var(--red); }
.sv-read:hover svg { transform: translateX(6px); }

.sv-more { padding-top: clamp(30px, 3vw, 60px); padding-bottom: clamp(20px, 2vw, 40px); }
.sv-more-list { border-top: 1px solid var(--line); }
.sv-more-list a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(16px, 1.6vw, 28px) 0; border-bottom: 1px solid var(--line); font-size: clamp(24px, 2.6vw, 50px); letter-spacing: -.035em; line-height: 1.1; transition: color .35s, padding .6s var(--ease); }
.sv-more-list a small { display: block; margin-top: 6px; font-size: clamp(13px, .9vw, 15px); letter-spacing: 0; color: var(--text-2); max-width: 46em; line-height: 1.5; }
.sv-more-list svg { width: clamp(24px, 2.4vw, 44px); height: clamp(24px, 2.4vw, 44px); flex: none; fill: none; stroke: var(--red); stroke-width: 1.3; transform: rotate(-45deg); transition: transform .6s var(--ease); }
.sv-more-list a:hover { color: var(--red); padding-left: clamp(8px, 1vw, 20px); }
.sv-more-list a:hover svg { transform: rotate(0deg); }
.sv-index { padding-top: clamp(50px, 5vw, 100px); }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .ar { grid-template-columns: minmax(0, 1fr); }
  .ar-aside { position: static; order: 2; }
  .ar-toc { display: none; }
  .sv-head { flex-direction: column; align-items: flex-start; }
  .sv-tools { justify-content: flex-start; }
  .sv-list { grid-template-columns: 1fr 1fr; }
  .sv-list li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .sv-list li:nth-child(2n) { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.14); }
  .sv-step-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .ph-inner { padding-top: 60px; }
  .ar-meta .ar-dot { display: none; }
  .sv-prob-grid, .sv-list, .sv-step-grid { grid-template-columns: 1fr; }
  .sv-list li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .prose pre { font-size: 12.5px; margin-left: -4px; margin-right: -4px; }
}

/* tables in articles */
.prose table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .86em; line-height: 1.45; -webkit-overflow-scrolling: touch; }
.prose thead th { font-family: var(--f-mono); font-size: .82em; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--black); white-space: nowrap; }
.prose td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 84px; }
.prose td code { white-space: normal; overflow-wrap: anywhere; }
.prose tbody tr { transition: background-color .25s; }
.prose tbody tr:hover { background: var(--gray-bg); }
.ar-toc { max-height: calc(100vh - 260px); overflow-y: auto; scrollbar-width: thin; }
