/* Dekalb Chiropractic: home-page extras: the numbers strip, the 3D spine, the Range lab. */

/* ---------- numbers strip ---------- */
.dkc-stats { list-style: none; margin: 0; padding: 28px var(--pad) 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; background: var(--white); }
@media (min-width: 900px) { .dkc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding-top: 36px; } .dkc-stats__i + .dkc-stats__i { border-left: 1px solid var(--line); padding-left: 28px; } }
.dkc-stats__i { display: flex; flex-direction: column; gap: 4px; }
.dkc-stats__n { font: 800 clamp(2.4rem, 1.6rem + 3vw, 3.6rem)/1 var(--display); color: var(--teal); font-variant-numeric: tabular-nums; }
.dkc-stats__i span { font-size: .93rem; line-height: 1.45; color: var(--mute); max-width: 26ch; }
.dkc-stats__ruler { margin: 0 var(--pad); }
.dkc-fx-off .dkc-stats__n { min-width: 0 !important; }

/* ---------- 3D spine (dark band) ---------- */
.dkc-spine { background: radial-gradient(120% 90% at 78% 40%, #1d4252 0%, #10272f 62%); color: #d3e0e5; padding: var(--sec) var(--pad); --glow: rgba(217, 113, 43, .2); }
.dkc-spine__in { display: grid; gap: 36px 56px; align-items: center; }
@media (min-width: 900px) { .dkc-spine__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dkc-spine .dkc-kicker { color: #8fd0e3; }
.dkc-spine .dkc-kicker::before { filter: brightness(2.2) saturate(.6); }
.dkc-spine h2 { color: #fff; max-width: 16ch; }
.dkc-spine__lead { max-width: 46ch; color: #d3e0e5; }
.dkc-spine__lbl, .dkc-game__lbl { display: block; font: 600 .95rem var(--body); margin: 22px 0 8px; }
.dkc-spine__lbl { color: #fff; }
.dkc-spine__out { margin: 14px 0 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: .95rem; }
.dkc-spine__deg { font: 800 2.4rem/1 var(--display); color: #ffb98a; font-variant-numeric: tabular-nums; min-width: 3.2ch; }
.dkc-spine__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dkc-spine__note { margin: 12px 0 0; font-size: .9rem; color: #ffd2b4; }
.dkc-spine__fine { margin: 26px 0 0; font-size: .85rem; color: #a9c0c9; max-width: 52ch; }
.dkc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid #8fd0e3; border-radius: 0; background: transparent; color: #fff; font: 600 .95rem var(--body); cursor: pointer; clip-path: var(--chamfer); }
.dkc-chip:hover { background: #8fd0e3; color: var(--ink); }
.dkc-spine :focus-visible, .dkc-lab .dkc-tabs :focus-visible { outline-color: #fff; }
.dkc-chip__ico { display: inline-flex; }
.dkc-chip .dkc-ico { width: 20px; height: 20px; }
.dkc-chip .dkc-ico--play, .dkc-chip.is-paused .dkc-ico--pause { display: none; }
.dkc-chip.is-paused .dkc-ico--play { display: block; fill: currentColor; stroke: none; }

.dkc-spine__stage { position: relative; aspect-ratio: 5 / 6; max-height: 78vh; width: 100%; max-width: 560px; margin: 0 auto; touch-action: pan-y; cursor: grab; background: radial-gradient(70% 55% at 50% 45%, rgba(143, 208, 227, .16), transparent 70%); border: 1px solid #2a4a58; overflow: hidden; }
.dkc-spine__stage:active { cursor: grabbing; }
.dkc-spine__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dkc-spine__cv, .dkc-spine__ovl { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.dkc-spine.is-live .dkc-spine__cv, .dkc-spine.is-live .dkc-spine__ovl { display: block; }
.dkc-spine.is-live .dkc-spine__poster { visibility: hidden; }
.dkc-spine__ovl { pointer-events: none; }
.dkc-spine__ovl line { stroke-width: 3; stroke-linecap: round; }
.dkc-spine__l1 { stroke: #8fd0e3; }
.dkc-spine__l2 { stroke: #ffb98a; }
.dkc-spine__ovl g { transition: opacity .25s; }
.dkc-ruler--on-dark { position: absolute; left: 0; right: 0; bottom: 0; --teal: #8fd0e3; }
.dkc-fx-off .dkc-spine__ui, .dkc-fx-off .dkc-spine__lead { }
.dkc-fx-off .dkc-spine__cv, .dkc-fx-off .dkc-spine__ovl { display: none !important; }
.dkc-fx-off .dkc-spine__poster { visibility: visible !important; }
.dkc-fx-off .dkc-spine__ui { display: none; }
.dkc-spine.is-static .dkc-spine__ui { display: none; }
.dkc-spine.is-static .dkc-spine__lead::after { content: " (Your browser cannot show the 3D model, so here is a picture.)"; }
.dkc-spine.is-static .dkc-spine__stage { cursor: default; }

/* range sliders (spine bend, angle game, posture rows) */
.dkc-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.dkc-range::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, #8fd0e3, #ffb98a); }
.dkc-range::-moz-range-track { height: 6px; background: linear-gradient(90deg, #8fd0e3, #ffb98a); }
.dkc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -12px; background: #fff; border: 4px solid var(--orange); border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.dkc-range::-moz-range-thumb { width: 22px; height: 22px; background: #fff; border: 4px solid var(--orange); border-radius: 50%; }
.dkc-range:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* ---------- Range lab ---------- */
.dkc-lab { display: none; background: var(--pale); padding: var(--sec) var(--pad); }
.dkc-js .dkc-lab { display: block; }
.dkc-fx-off .dkc-lab { display: none; }
.dkc-lab__head { margin-bottom: 26px; }
.dkc-lab__head h2 { margin-bottom: .3em; }
.dkc-lab__lead { max-width: 60ch; margin: 0; }
.dkc-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 2px solid var(--teal); }
.dkc-tabs button { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border: 0; border-radius: 0; background: transparent; color: var(--teal-dark); font: 600 1rem var(--body); cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -2px; }
.dkc-tabs button span { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; background: var(--teal); color: #fff; font: 700 .85rem var(--body); clip-path: var(--chamfer); }
.dkc-tabs button[aria-selected="true"] { background: var(--white); border-bottom-color: var(--orange); color: var(--ink); }
.dkc-tabs button:hover { background: #dfeaee; }
.dkc-tabs button[aria-selected="true"]:hover { background: var(--white); }
@media (max-width: 599px) { .dkc-tabs button { flex: 1 1 100%; justify-content: flex-start; } }
.dkc-pan { background: var(--white); padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-top: 0; }
.dkc-game { display: grid; gap: 28px 48px; align-items: start; }
@media (min-width: 900px) { .dkc-game { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.dkc-game h3 { margin-bottom: .35em; }
.dkc-game__side > p { max-width: 46ch; }
.dkc-game__round { font: 700 1.1rem var(--display); color: var(--ink); margin: 18px 0 4px; }
.dkc-game__ask { margin: 0 0 4px; font-size: 1.1rem; }
.dkc-game__ask strong { font: 800 2rem/1 var(--display); color: var(--orange); font-variant-numeric: tabular-nums; }
.dkc-game__moves { margin: 0 0 8px; color: var(--mute); }
.dkc-game__lbl { color: var(--ink); }
.dkc-game__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.dkc-game__res { margin: 16px 0 0; min-height: 3em; font-weight: 500; color: var(--ink); max-width: 46ch; }
.dkc-lab .dkc-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--teal), var(--teal)); }
.dkc-lab .dkc-range::-moz-range-track { background: var(--teal); }
.dkc-lab .dkc-range::-webkit-slider-thumb { box-shadow: 0 2px 6px rgba(16, 39, 47, .35); }
.dkc-lab .dkc-range:focus-visible { outline-color: var(--teal); }

.dkc-dial { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; touch-action: none; cursor: crosshair; background: var(--pale); }
.dkc-dial__base, .dkc-dial__rim { fill: none; stroke: var(--teal); stroke-width: 3; }
.dkc-dial__ticks path { stroke: var(--teal); stroke-width: 2; fill: none; }
.dkc-dial__arm { stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.dkc-dial__ghost { stroke: var(--orange); stroke-width: 7; stroke-linecap: round; opacity: 0; stroke-dasharray: 2 12; }
.dkc-dial__hub { fill: var(--orange); }
.dkc-dial__txt { font: 600 13px var(--body); fill: var(--mute); }

/* posture: each vertebra is a slider thumb on a row with a plumb line down the middle */
.dkc-post { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; }
.dkc-post::before { content: ""; position: absolute; left: calc(8.5rem + 12px + (100% - 14.5rem - 24px) / 2); top: -6px; bottom: -6px; width: 0; border-left: 2px dashed var(--orange); pointer-events: none; opacity: .9; }
.dkc-post__row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 6rem; align-items: center; gap: 0 12px; position: relative; }
.dkc-post__lbl { font-size: .9rem; line-height: 1.25; }
.dkc-post__lbl strong { display: block; font: 700 1rem var(--display); }
.dkc-post__st { font-size: .85rem; color: var(--mute); text-align: right; font-variant-numeric: tabular-nums; }
.dkc-post__row.is-ok .dkc-post__st { color: var(--teal-dark); font-weight: 700; }
.dkc-post__row.is-ok .dkc-post__st::before { content: "✓ "; }
.dkc-range--vert::-webkit-slider-runnable-track { height: 2px; background: var(--keyline) !important; }
.dkc-range--vert::-moz-range-track { height: 2px; background: var(--keyline) !important; }
.dkc-range--vert::-webkit-slider-thumb { width: 84px; height: 26px; margin-top: -12px; border-radius: 0; border: 0; background: var(--teal); clip-path: var(--chamfer); box-shadow: none; }
.dkc-range--vert::-moz-range-thumb { width: 84px; height: 26px; border-radius: 0; border: 0; background: var(--teal); clip-path: var(--chamfer); }
.dkc-post__row.is-ok .dkc-range--vert::-webkit-slider-thumb { background: var(--orange); }
.dkc-post__row.is-ok .dkc-range--vert::-moz-range-thumb { background: var(--orange); }
.dkc-post__track { position: relative; }
@media (max-width: 599px) { .dkc-post__row { grid-template-columns: 1fr 5.2rem; } .dkc-post__track { grid-column: 1 / -1; grid-row: 2; } .dkc-post::before { display: none; } .dkc-post__track::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; border-left: 2px dashed var(--orange); pointer-events: none; } }
.is-won .dkc-post__row .dkc-post__st { color: var(--teal-dark); }

/* finder */
.dkc-find__prog { height: 4px; background: var(--line); margin-top: 22px; max-width: 260px; }
.dkc-find__prog i { display: block; height: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); transition: transform .4s; }
.dkc-find__q, .dkc-find__res { border: 0; padding: 0; margin: 0; min-width: 0; outline: none; }
.dkc-find__n { font: 600 .8rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin: 0 0 8px; }
.dkc-find legend { font: 700 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.25 var(--display); color: var(--ink); padding: 0; margin-bottom: 18px; outline: none; }
.dkc-find__opts { display: grid; gap: 10px; }
@media (min-width: 600px) { .dkc-find__opts { grid-template-columns: 1fr 1fr; } }
.dkc-find__opt { min-height: 60px; padding: 12px 18px; text-align: left; border: 2px solid var(--teal); background: var(--white); color: var(--ink); font: 500 1.05rem/1.3 var(--body); cursor: pointer; }
.dkc-find__opt:hover { background: var(--teal); color: #fff; }
.dkc-find__back { margin-top: 18px; min-height: 44px; border: 0; background: none; color: var(--teal-dark); font: 600 .95rem var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0 4px; }
.dkc-find__res h3 { margin: 0 0 .4em; }
.dkc-find__res p { max-width: 54ch; }
.dkc-find__btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }
.dkc-find__fine { font-size: .85rem; color: var(--mute); margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
	html:not(.dkc-fx-off) .dkc-find__q.is-in, html:not(.dkc-fx-off) .dkc-find__res.is-in { animation: dkc-slide .45s cubic-bezier(.2, .8, .2, 1) both; }
	@keyframes dkc-slide { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
	html:not(.dkc-fx-off) .dkc-pan:not([hidden]) { animation: dkc-fadepan .35s ease both; }
	@keyframes dkc-fadepan { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
	html:not(.dkc-fx-off) .dkc-lab.is-won .dkc-pan[data-lab-pan="2"] { box-shadow: inset 0 0 0 3px var(--orange); transition: box-shadow .4s; }
}
.dkc-glow.dkc-lab { --glow: rgba(27, 96, 120, .14); }
