.tkd-cases { background: var(--paper, #fafafa); color: var(--ink, #0e0b0a); border-block-start: 1px solid var(--line); padding-block: clamp(64px, 7vw, 108px); }
.tkd-cases .cs-head { margin-bottom: 32px; }
.tkd-cases .section-label { font-size: .88rem; margin: 0 0 15px; }
.cs-head h2 { max-width: 810px; margin: 0; font: 400 clamp(2.1rem, 3.5vw, 3.1rem)/1.13 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.cs-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.cs-tabs a, .cs-action {
  display: inline-flex; align-items: center; min-height: 46px; justify-content: center;
  border: 1px solid #cbc9c8; border-radius: 6px; padding: 9px 16px;
  font: 500 .94rem/1.45 var(--ui); color: #292625;
}
.cs-tabs a:hover, .cs-action:hover { border-color: #696563; background: #f1f0ef; }
.cs-tabs [aria-selected="true"] { color: white; background: var(--ink); border-color: var(--ink); }
.cs-use-panel { display: grid; grid-template-columns: .86fr 1.14fr; background: #efeeec; border: 1px solid #ddd9d6; border-radius: 9px; overflow: hidden; }
.cs-use-panel + .cs-use-panel { margin-top: 20px; }
.cs-use-panel[hidden] { display: none; }
.cs-use-panel[role="tabpanel"] { margin: 0; }
.cs-use-panel[role="tabpanel"]:focus-visible { outline-offset: 3px; }
.cs-use-text { align-self: center; padding: clamp(25px, 4vw, 64px); }
.cs-use-text h3 { max-width: 490px; margin: 0; font: 400 clamp(1.8rem, 2.85vw, 2.65rem)/1.12 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.cs-use-text p { color: #494644; font: 400 1.04rem/1.6 var(--sans); }
.cs-use-text p { margin: 16px 0 25px; max-width: 38ch; }
.cs-action { background: #fafafa; font: 400 .88rem/1.4 var(--mono); }
.cs-use-panel img { align-self: stretch; width: 100%; height: 100%; min-height: 320px; max-height: 450px; object-fit: cover; }
@media (max-width: 850px) {
  .cs-use-text { padding: 24px; }
}
@media (max-width: 680px) {
  .tkd-cases { padding-block: 48px; }
  .cs-use-panel { grid-template-columns: 1fr; }
  .cs-use-panel img { height: auto; min-height: 0; aspect-ratio: 1.85; }
  .cs-tabs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cs-tabs a { padding-inline: 8px; text-align: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .cs-use-panel[role="tabpanel"]:not([hidden]) .cs-use-text { animation: tkd-appear .28s ease-out; }
}

/* Homepage case studies */
.tkd-studies {
  padding-block: clamp(54px, 5.6vw, 88px);
  color: #1c211e;
  background: #f7f6f2;
  border-block-start: 1px solid #deded7;
}
.case-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(19px, 2vw, 30px); }
.case-heading .section-label { display: flex; align-items: center; gap: .62rem; margin: 0 0 9px; color: #535851; }
.case-heading .section-label::before { content: ""; width: 23px; height: 1px; background: currentColor; }
.case-heading h2 { margin: 0; font: 450 clamp(2.45rem, 4.3vw, 4.45rem)/1.04 var(--sans); letter-spacing: -.055em; }
.case-guide { margin-top: 10px; font: 400 clamp(1rem, 1.24vw, 1.16rem)/1.45 var(--ui); color: #535852; }
.case-controls { display: none; align-items: center; gap: 6px; flex: 0 0 auto; }
[data-case-ready] .case-controls { display: flex; }
.case-counter { display: flex; align-items: center; gap: 7px; margin-inline-end: 7px; color: #58605a; font: 450 .88rem var(--mono); }
.case-counter b { color: #1f2521; font-weight: 650; }
.case-counter i { width: 19px; height: 1px; background: #a0a69e; transform: rotate(-46deg); }
.case-controls button { display: grid; place-items: center; width: 46px; height: 46px; background: transparent; border: 1px solid #a1a69b; border-radius: 50%; cursor: pointer; color: #29332c; }
.case-controls [data-case-next] { background: #232923; border-color: #232923; color: white; }
.case-controls button span { width: 9px; height: 9px; border-top: 1.7px solid; border-right: 1.7px solid; }
.case-controls [data-case-prev] span { transform: translateX(2px) rotate(-135deg); }
.case-controls [data-case-next] span { transform: translateX(-2px) rotate(45deg); }
.case-controls button:hover { background: #dcded4; color: #152017; }
.case-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 0; margin: 0 0 8px; }
.case-malik { --surface: #304f3c; --tint: #d5ebae; --note: #f6efdb; --doc-ink: #394b33; --focal: 52% 42%; }
.case-jodi { --surface: #143c36; --tint: #bfe7b9; --note: #fff1cb; --doc-ink: #393623; --focal: 55% 42%; }
.case-felicia { --surface: #193046; --tint: #bce2f5; --note: #e3f5fb; --doc-ink: #203b4b; --focal: 48% 43%; }
.case-ron { --surface: #293a43; --tint: #ffd28a; --note: #f8e9b9; --doc-ink: #3c3728; --focal: 49% 36%; }
.case-robert { --surface: #502820; --tint: #ffbd96; --note: #fcebd6; --doc-ink: #573326; --focal: 60% 48%; }
.case-pick { position: relative; display: flex; align-items: center; gap: clamp(8px, 1vw, 16px); min-width: 0; padding: 9px clamp(9px, 1vw, 17px); border: 1px solid #d1d2c7; background: #efefe8; border-radius: 6px 6px 2px 2px; color: #404640; }
.case-pick[aria-selected="true"] { border-color: var(--surface); background: var(--surface); color: white; }
.case-pick::after { content: ""; position: absolute; left: 10px; right: 10px; height: 2px; bottom: 0; background: transparent; }
.case-pick[aria-selected="true"]::after { background: var(--tint); }
.case-pick img { width: clamp(34px, 4vw, 61px); height: clamp(33px, 3vw, 45px); object-fit: cover; border-radius: 3px; flex: none; filter: saturate(.75); }
.case-pick:hover { border-color: #838b7c; }
.case-pick:hover img, .case-pick[aria-selected="true"] img { filter: none; }
.case-pick > span { display: grid; gap: 1px; }
.case-pick b { font: 630 clamp(1rem, 1.35vw, 1.24rem)/1.15 var(--ui); letter-spacing: -.035em; }
.case-pick small { font: 450 .875rem/1.24 var(--ui); }
.case-pick[aria-selected="true"] small { color: var(--tint); }
.case-frame { position: relative; isolation: isolate; touch-action: pan-y pinch-zoom; }
.case-sheet {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  min-height: clamp(400px, 35vw, 498px); color: #fcfaf3; background: var(--surface);
  border-radius: 6px; overflow: hidden; scroll-margin-top: 24px;
}
.case-sheet + .case-sheet { margin-top: 14px; }
[data-case-ready] .case-sheet { margin-top: 0; }
.case-sheet[hidden] { display: none; }
.case-message { position: relative; z-index: 2; grid-column: 1; grid-row: 1; align-self: center; padding: clamp(24px, 3vw, 54px); padding-right: clamp(20px, 2.3vw, 40px); }
.case-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin: 0; font: 500 .86rem/1.3 var(--mono); color: var(--tint); }
.case-byline b { color: #fffef9; font-weight: 550; }
.case-byline i, .case-document-label i { display: inline-block; width: 16px; height: 1px; background: currentColor; opacity: .65; }
.case-message h3 { max-width: 17ch; margin: 13px 0 14px; font: 440 clamp(2.1rem, 3.55vw, 3.75rem)/1.035 var(--sans); letter-spacing: -.055em; text-wrap: balance; }
.case-message h3 em { display: block; color: var(--tint); font: inherit; }
.case-synopsis { max-width: 45ch; margin: 0; color: #edf0e9; font: 400 clamp(1rem, 1.15vw, 1.16rem)/1.52 var(--ui); }
.case-links { display: flex; flex-wrap: wrap; gap: 6px 19px; align-items: center; margin-top: clamp(19px, 2.4vw, 38px); }
.case-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 9px; font: 570 .97rem/1.2 var(--ui); }
.case-read { color: #15251d; background: var(--tint); border-radius: 4px; padding: 10px 16px; }
.case-read:hover { background: white; }
.case-demo { color: #fffdf6; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c7d3c6; }
.case-demo i { width: 0; height: 0; border: 5px solid transparent; border-inline-start: 8px solid var(--tint); border-inline-end: 0; }
.case-scene { position: relative; grid-column: 2; grid-row: 1; min-width: 0; isolation: isolate; background: var(--surface); }
.case-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focal); }
.case-scene::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg,var(--surface), transparent 18%),linear-gradient(0deg,#10170f46,transparent 45%); }
.case-document {
  position: absolute; z-index: 2; right: clamp(14px, 2.1vw, 34px); bottom: clamp(18px, 2vw, 31px);
  display: flex; flex-direction: column; align-items: flex-start; width: clamp(216px, 20.3vw, 285px); padding: 13px 16px 12px;
  color: var(--doc-ink); background: var(--note); filter: drop-shadow(0 5px 6px #1b201d42); transform: rotate(-3deg); transform-origin: 70% 85%;
}
.case-document::after {
  content: ""; position: absolute; inset: calc(100% - 1px) 0 auto; height: 6px;
  background: linear-gradient(135deg,var(--note) 27%,transparent 28%) 0 0/10px 10px repeat-x,linear-gradient(225deg,var(--note) 27%,transparent 28%) 0 0/10px 10px repeat-x;
}
.case-document-label { width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font: 550 .75rem/1.25 var(--mono); }
.case-document-label img { width: 16px; height: 16px; }
.case-document-label i { width: 9px; }
.case-document strong { margin-top: 7px; font: 650 clamp(1.55rem, 2.15vw, 2.48rem)/1.05 var(--ui); letter-spacing: -.065em; }
.case-metric-caption { font: 520 .93rem/1.25 var(--ui); margin-top: 3px; }
.case-formula { width: 100%; margin-top: 8px; padding-top: 6px; border-top: 1px dashed #766e596e; font: 420 .8rem/1.3 var(--mono); }
.case-math-link { font: 600 .84rem/1.3 var(--ui); margin-top: 6px; text-decoration: underline; text-underline-offset: 2px; }
.case-document:hover .case-math-link { text-decoration-thickness: 2px; }
.case-felicia .case-document { transform: rotate(2deg); border-left: 4px solid #498ba4; border-radius: 5px; }
.case-felicia .case-document::after, .case-ron .case-document::after { display: none; }
.case-ron .case-document { transform: rotate(-2deg); border-top: 4px solid #bd8d36; background-image: repeating-linear-gradient(0deg,transparent 0 15px,#5d4c2410 15px 16px); }
.case-robert .case-document { transform: rotate(2deg); }
.case-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tkd-studies :is(a,button):focus-visible { outline: 3px solid #275ad2; outline-offset: 2px; }
.tkd-studies .case-links a:focus-visible, .tkd-studies .case-sheet:focus-visible { outline: 3px solid white; outline-offset: -3px; }
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .case-sheet.is-entering .case-scene { animation: case-unfold .54s cubic-bezier(.22,.67,.21,1) both; }
  [data-direction="backward"] .case-sheet.is-entering .case-scene { animation-name: case-refold; }
  .case-sheet.is-entering .case-photo { animation: case-photo-settle .6s ease-out both; }
  .case-sheet.is-entering .case-document { animation: case-paper-settle .52s .04s ease-out both; }
  .case-sheet.is-entering .case-message { animation: case-type-settle .38s ease-out both; }
  @keyframes case-unfold { from { clip-path: polygon(0 0,16% 0,0 100%,0 100%); } to { clip-path: polygon(0 0,108% 0,100% 100%,0 100%); } }
  @keyframes case-refold { from { clip-path: polygon(100% 0,100% 0,100% 100%,84% 100%); } to { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); } }
  @keyframes case-photo-settle { from { scale: 1.045; } to { scale: 1; } }
  @keyframes case-paper-settle { from { translate: 7px 25px; rotate: 4deg; opacity: 0; } to { translate: 0 0; rotate: 0deg; opacity: 1; } }
  @keyframes case-type-settle { from { opacity: .4; translate: 0 9px; } to { opacity: 1; translate: 0 0; } }
}
@media (max-width: 960px) {
  .case-pick { gap: 7px; padding-inline: 8px; }
  .case-sheet { grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); }
  .case-message { padding-inline: clamp(18px, 3.1vw, 32px); }
  .case-document { right: 14px; bottom: 16px; }
}
@media (max-width: 760px) {
  .tkd-studies { padding-block: 45px; }
  .case-heading { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 10px; }
  .case-heading h2 { font-size: clamp(2.05rem, 6.3vw, 3rem); }
  .case-controls { padding-top: 2px; }
  .case-counter { display: none; }
  .case-controls button { width: 43px; height: 43px; }
  .case-guide { font-size: 1rem; }
  .case-picks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-pick { min-height: 49px; }
  .case-pick img { width: 41px; height: 33px; }
  .case-sheet { display: grid; grid-template-columns: 1fr; min-height: 0; }
  .case-scene { display: contents; }
  .case-scene::before { display: none; }
  .case-photo { position: static; grid-column: 1; grid-row: 1; width: 100%; height: clamp(155px,39vw,275px); }
  .case-message { grid-column: 1; grid-row: 2; padding: 20px clamp(17px,3.2vw,30px) 17px; }
  .case-message h3 { max-width: 24ch; font-size: clamp(1.85rem,6vw,2.65rem); margin-block: 9px; }
  .case-message h3 em { display: inline; }
  .case-links { margin-top: 14px; }
  .case-document, .case-felicia .case-document, .case-ron .case-document, .case-robert .case-document { position: relative; grid-column: 1; grid-row: 3; inset: auto; width: auto; max-width: 660px; margin: 0 clamp(17px,3.2vw,30px) 19px; padding: 11px 14px; transform: none; }
  .case-document { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; }
  .case-document-label { grid-column: 1/-1; }
  .case-document strong,.case-metric-caption { grid-column: 1/-1; }
  .case-formula { width: auto; }
  .case-math-link { align-self: end; }
}
@media(max-width:450px) {
  .case-heading { display: block; position: relative; }
  .case-heading .section-label { margin-bottom: 13px; min-height: 32px; padding-right: 108px; }
  .case-controls { position: absolute; right: 0; top: -8px; }
  .case-pick img { width: 34px; }
  .case-pick small { font-size: .8rem; }
  .case-links { gap: 5px 15px; }
}
@media(max-width:760px) and (prefers-reduced-motion:no-preference) {
  .case-sheet.is-entering .case-photo { animation: case-mobile-enter .3s ease-out; }
  @keyframes case-mobile-enter { from { opacity: .65; } to { opacity: 1; } }
}
@media print {
  .case-controls,.case-picks,.case-live { display: none!important; }
  .case-sheet[hidden] { display: grid!important; }
  .case-sheet { break-inside: avoid; margin-bottom: 12px; }
}
