/*
 * skills.raq.com skill page (Alex chose the "Template" design from four on 22 Nov 2026, then asked for its weak parts
 * fixed). A sticky details panel holds the title and Add to Raq.com; beside it, large panels show the skill working,
 * with one graphite panel for the answer and its checks. Plain sans type throughout: Alex finds code-style mono
 * off-putting. The other designs are in commit 80d0048f00.
 */
body.s-page { background: #fff; }
/* Example questions can hold long web addresses; let them break rather than widen the page. */
.s-page main :is(p, li, blockquote, figcaption) { overflow-wrap: anywhere; }

/* ---------- Shared pieces ---------- */
.s-works-logos { display: flex; flex: none; }
.s-works-logos img { width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); object-fit: contain; }
.s-works-logos img + img { margin-left: -5px; }
.s-bubble-me { justify-self: start; width: fit-content; max-width: 86%; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--ink); color: #fff; font-size: 16px; line-height: 1.45; }
.s-note { padding: 14px 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; border-top: 1px solid var(--edge); }
.s-note small { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12.5px; font-weight: 500; color: var(--faint); white-space: normal; }
.s-note small svg { width: 14px; height: 14px; }
.s-ticks { display: grid; gap: 12px; list-style: none; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.s-ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.s-ticks svg { width: 22px; height: 22px; margin-top: 1px; padding: 4px; border-radius: 50%; background: var(--pass-bg); color: var(--pass); }
.s-dots { display: grid; gap: 10px; list-style: none; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.s-dots li { position: relative; padding-left: 20px; }
.s-dots li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: #b8bec8; }


.s-test { padding: 18px 0; border-top: 1px solid var(--edge); }
.s-test + .s-test { margin-top: 16px; }
.s-test-steps { display: grid; gap: 24px; list-style: none; counter-reset: s-t; }
.s-test-steps > li { position: relative; padding-left: 46px; counter-increment: s-t; }
.s-test-steps > li::before { content: counter(s-t); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.s-test-steps b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.s-test-steps p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.s-test-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.s-test-case { max-height: 240px; overflow: auto; background: var(--ground); }
.s-test textarea { display: block; width: 100%; min-height: 104px; margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--edge); font-size: 15px; line-height: 1.5; resize: vertical; }
.s-test textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.s-test-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; }
.s-test .grade:not(:empty) { padding: 8px 13px; border-radius: 12px; font-size: 14.5px; }
.s-test .grade.is-pass { background: var(--pass-bg); }
.s-test .grade.is-fail { background: var(--gap-bg); }
.s-test-privacy { margin-top: 16px; font-size: 13px; color: var(--faint); }
.s-more { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.s-more summary { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 500; list-style: none; cursor: pointer; }
.s-more summary::-webkit-details-marker { display: none; }
.s-more summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 3px 0 2px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); }
.s-more[open] summary::before { transform: rotate(45deg); }
.s-more p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.s-more .s-dots { margin-top: 14px; }
.s-answer { margin: 12px 0 0; padding: 12px 14px; overflow-x: auto; border-radius: 12px; background: var(--ground); font: 13.5px/1.55 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink-2); white-space: pre; }
.s-others { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: 15.5px; }
.s-meta { margin-top: 14px; font-size: 14px; color: var(--faint); }
.s-page .c-related .c-h2 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.04em; }

/* ---------- Phone add bar: appears once the details panel's Add button scrolls away ---------- */
.s-dock { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 6px 6px 6px 8px; border-radius: 999px; background: rgb(255 255 255 / 94%); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgb(28 31 42 / 45%); backdrop-filter: blur(12px); transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; }
.s-dock.is-shown { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease); }
.s-dock-skill { display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 10px; }
.s-dock-skill b { overflow: hidden; max-width: 340px; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }
.s-dock .ka-key { --s: 30px; }
.s-dock .s-dock-dl { width: 40px; padding: 0; }


@media (max-width: 760px) {
  .s-bubble-me { max-width: 94%; }
  .s-test { padding: 20px 18px; }
  .s-test-steps > li { padding-left: 0; }
  .s-test-steps > li::before { position: static; margin-bottom: 10px; }
  .s-dock { left: 12px; right: 12px; transform: translateY(calc(100% + 40px)); padding: 6px; }
  .s-dock.is-shown { transform: none; }
  .s-dock-skill { display: none; }
  .s-dock .pill:not(.s-dock-dl) { flex: 1; min-height: 46px; }
  .s-dock .s-dock-dl { width: 46px; min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .s-dock, .s-dock.is-shown { transition: none; }
}

/* ---------- Layout ---------- */
.tp { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "gallery info"; align-items: start; gap: clamp(40px, 5vw, 80px); padding-top: 22px; }
.tp-info { position: sticky; top: 108px; grid-area: info; }
.tp-gallery { display: grid; gap: 20px; grid-area: gallery; min-width: 0; }
.tp-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; }
.tp-back:hover { color: var(--ink); }
.tp-back svg { width: 14px; height: 14px; transform: rotate(180deg); transition: transform .2s var(--ease); }
.tp-back:hover svg { transform: rotate(180deg) translateX(2px); }
.tp-info h1 { font-size: clamp(32px, 2.9vw, 42px); line-height: 1.06; letter-spacing: -0.045em; }
.tp-sum { margin-top: 14px; font-size: 17.5px; line-height: 1.5; color: var(--muted); }
.tp-get { display: grid; gap: 10px; margin-top: 26px; }
.tp-get .pill { width: 100%; }
.tp-facts { margin: 26px 0 0; border-top: 1px solid var(--line); }
.tp-facts div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.tp-facts dt { color: var(--faint); }
.tp-facts dd { margin: 0; font-weight: 500; text-align: right; }
.tp-facts a { color: inherit; }
.tp-facts .s-works-logos img { width: 26px; height: 26px; }

.tp-panel { padding: clamp(24px, 3.4vw, 44px); background: var(--ground); }
.tp-cap { margin-bottom: 26px; }
.tp-cap h2 { font-size: clamp(22px, 2vw, 27px); line-height: 1.15; letter-spacing: -0.035em; }
.tp-cap p { margin-top: 6px; font-size: 16px; color: var(--muted); }
.tp-scene { display: grid; gap: 14px; }
.tp-ask .tp-scene { justify-items: end; }
.tp-ask .s-bubble-me { justify-self: end; border-radius: 22px 22px 6px 22px; font-size: 18px; padding: 14px 20px; }
.tp-doc { width: auto; padding: 16px 0; border-top: 1px solid var(--edge); justify-self: stretch; }
.tp-doc-name { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.tp-doc-name svg { width: 16px; height: 16px; color: var(--faint); }
.tp-doc-text { font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }

.tp-dark { background: radial-gradient(70% 60% at 100% 0%, rgb(245 198 165 / 16%), transparent 70%), linear-gradient(180deg, #262a32 0%, #15171c 100%); color: #fff; }
.tp-dark .tp-cap p { color: rgb(255 255 255 / 62%); }
.tp-reply { padding: 18px 0; color: #fff; border-top: 1px solid rgb(255 255 255 / 35%); }
.tp-who { display: flex; align-items: center; gap: 10px; }
.tp-who img { width: 32px; height: 32px; padding: 4px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.tp-who span { display: grid; font-size: 14px; font-weight: 600; line-height: 1.25; }
.tp-who small { font-size: 12.5px; font-weight: 400; color: rgb(255 255 255 / 72%); }
.tp-answer { margin-top: 12px; font-size: 17px; line-height: 1.6; }
.tp-checked { display: grid; gap: 12px; margin-top: 10px; list-style: none; }
.tp-checked li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; font-size: 15.5px; line-height: 1.55; color: rgb(255 255 255 / 62%); }
.tp-checked b { font-weight: 600; color: #fff; }
.tp-checked svg { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: rgb(245 198 165 / 16%); color: var(--ka-glyph); }
.tp-checked:first-child { margin-top: 0; }
.tp-scene > .tp-checked { margin-top: 18px; }
.tp-why { margin-top: 10px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 12%); font-size: 15px; color: rgb(255 255 255 / 62%); }
.tp-why b { font-weight: 600; color: #fff; }

.tp-steps { overflow: hidden; list-style: none; counter-reset: tp-step; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.tp-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 18px 22px; font-size: 16px; line-height: 1.6; color: var(--muted); counter-increment: tp-step; }
.tp-steps li + li { border-top: 1px solid var(--line); }
.tp-steps li::before { content: counter(tp-step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ground); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tp-steps b { font-weight: 600; color: var(--ink); }

.tp-ready { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.tp-inputs { display: grid; gap: 10px; list-style: none; }
.tp-inputs li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; padding: 14px 0; font-size: 15.5px; line-height: 1.5; border-top: 1px solid var(--edge); }
.tp-inputs svg { width: 20px; height: 20px; margin-top: 1px; color: var(--faint); }
.tp-asks { display: grid; gap: 10px; list-style: none; }
.tp-asks li { display: flex; align-items: flex-end; gap: 10px; }
.tp-asks img { flex: none; width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tp-asks p { padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: #fff; font-size: 15px; line-height: 1.5; box-shadow: 0 1px 2px rgb(28 31 42 / 6%); }

.tp-test .s-test { border-top: 1px solid var(--edge); }
.tp-fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.tp-fit-card { padding: 16px 0 20px; border-top: 1px solid var(--edge); }
.tp-fit-card h3 { margin-bottom: 16px; font-size: 16px; letter-spacing: -0.02em; }
.tp-fit-card ul { display: grid; gap: 13px; list-style: none; }
.tp-fit-card li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.tp-fit-card svg { width: 22px; height: 22px; margin-top: 1px; padding: 4px; border-radius: 50%; background: var(--pass-bg); color: var(--pass); }
.tp-fit-not li { color: var(--muted); }
.tp-fit-not svg { padding: 5px; background: var(--soft); color: var(--faint); }
.tp-fit-card a { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
.tp-fit-card a:hover { text-decoration-color: currentColor; }

.tp-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; list-style: none; }
.tp-sources a { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; height: 100%; padding: 16px 0; color: var(--ink); text-decoration: none; transition: border-color .15s; border-top: 1px solid var(--edge); }
.tp-sources a:hover { border-color: var(--ink); }
.tp-sources span { display: grid; gap: 4px; }
.tp-sources b { font-size: 15.5px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.tp-sources small { font-size: 13.5px; color: var(--faint); }
.tp-sources svg { flex: none; width: 15px; height: 15px; margin-top: 4px; color: var(--faint); transform: rotate(-45deg); transition: color .15s; }
.tp-sources a:hover svg { color: var(--ink); }
.tp-other { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--edge); }
.tp-other > span { margin-right: 8px; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.tp-other .pill { min-height: 38px; font-weight: 500; }

@media (max-width: 1100px) {
  .tp { grid-template-columns: minmax(0, 1fr) 320px; }
  .tp-ready, .tp-fit { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .tp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "gallery"; gap: 36px; }
  .tp-info { position: static; max-width: 620px; }
  .tp-get { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tp-info h1 { font-size: 34px; }
  .tp-get { grid-template-columns: minmax(0, 1fr); }
  .tp-panel { margin: 0 -8px; padding: 24px 18px; }
  .tp-ask .s-bubble-me { font-size: 16.5px; }
  .tp-steps li { padding: 16px; }
  .tp-fit-card { padding: 16px 0; }
  .tp-other > span { width: 100%; }
}

/* ---------- Related skills: each card leads with the question it answers ---------- */
.s-related { padding-bottom: clamp(80px, 9vw, 128px); }
