/* Case study layout, modelled on a UX case-study template:
   overview -> problem -> objectives -> process -> users -> challenges -> features -> flow -> screens -> results. */

.practice-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.practice-tabs a { text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink); background: #fff; }
.practice-tabs a:hover { border-color: var(--brand); color: var(--brand); }

.practice { padding: 8px 0 40px; }
.practice > h2 { display: flex; align-items: baseline; gap: 12px; }
.practice > p { max-width: 720px; }
.work-card .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.work-card h3 { margin-bottom: 0.35em; }

.overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.overview dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.overview dd { margin: 4px 0 0; color: var(--ink); font-weight: 500; }

.cs-section { padding: 48px 0; border-top: 1px solid var(--border); }
.cs-section:first-of-type { border-top: 0; }
.cs-grid { display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.cs-grid > h2 { font-size: 1.35rem; margin: 0; }
.cs-body { max-width: 760px; }
.cs-body > :last-child { margin-bottom: 0; }

.problem { font-size: 1.15rem; color: var(--ink); border-left: 4px solid var(--brand); padding: 4px 0 4px 20px; margin: 0; }

.objectives { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.objectives li { margin: 0; padding: 16px 18px; background: var(--brand-soft); border-radius: var(--radius); color: var(--ink); }

.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: p; }
.process li { margin: 0; counter-increment: p; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.process li::before { content: counter(p, decimal-leading-zero); display: block; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.process strong { display: block; color: var(--ink); margin: 4px 0; }
.process span { font-size: 0.93rem; }

.users { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.user { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.user strong { color: var(--ink); display: block; margin-bottom: 4px; }
.user p { margin: 0; font-size: 0.95rem; }

.challenges { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.challenges li { margin: 0; padding-left: 26px; position: relative; }
.challenges li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 10px; height: 10px; border-radius: 2px; background: #f59e0b; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature strong { display: block; color: var(--ink); margin-bottom: 4px; }
.feature p { margin: 0; font-size: 0.95rem; }

.flow { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow li { margin: 0; padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--brand); color: var(--ink); font-size: 0.93rem; font-weight: 500; }
.flow li + li::before { content: "→"; color: var(--brand); margin: 0 8px 0 -4px; font-weight: 700; }

.screen img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.screen figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 10px; }
.terminal { background: #0b0d26; color: #d7dcf5; border-radius: var(--radius); padding: 20px; overflow-x: auto; font: 0.88rem/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; margin: 0; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric { padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); }
.metric strong { display: block; font-size: 1.7rem; color: var(--brand); line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric span { font-size: 0.9rem; color: var(--muted); }

.note { font-size: 0.92rem; color: var(--muted); background: var(--surface); border-radius: var(--radius); padding: 14px 18px; }
.next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .overview, .process { grid-template-columns: repeat(2, 1fr); }
  .cs-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .overview, .process, .objectives, .features { grid-template-columns: 1fr; }
}
