/* Fabrica's four-track composition: shared edges and deliberate inner spacing. */
#case-study{--case-card-radius:18px;--case-card-inset:40px}
#case-study .case-grid{height:600px;min-height:0}
#case-study .case-visual{--case-inset:var(--case-card-inset);border-radius:var(--case-card-radius);min-height:0}
#case-study .case-brand{font-size:80px}
#case-study .case-open{bottom:var(--case-inset);min-height:17px;line-height:1.4}
#case-study .case-top small{font-size:10px;line-height:1.4}
#case-study .case-details{position:relative;display:flex;flex-direction:column;overflow:hidden;min-height:0;border-radius:var(--case-card-radius);background:#fff;padding:var(--case-card-inset);scroll-margin-top:85px}
#case-study .case-details:before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:repeating-radial-gradient(circle at 0 0,transparent 0 62px,#eaeaea 63px,transparent 64px 105px);mask-image:linear-gradient(#0009,transparent 76%)}
#case-study .case-details>*{position:relative;z-index:1}
#case-study .case-details h3,#case-study .case-stat-label{font-size:14px;font-weight:400;line-height:1.3;color:#808080;letter-spacing:-.035em;margin:0 0 6px}
#case-study .case-stat-label{margin-top:40px}
#case-study .case-time-comparison{display:flex;align-items:baseline;gap:5px;font-size:30px;line-height:1.25;letter-spacing:-.055em;white-space:nowrap}
#case-study .case-time-comparison strong{font-weight:600}
#case-study .case-time-comparison small{font-size:.47em;letter-spacing:-.03em}
#case-study .case-time-comparison>span{font-size:.85em;margin-inline:2px}
#case-study .case-example-note{margin-top:auto;padding-top:40px;max-width:260px}
#case-study .case-example-note>span{font-size:12px;line-height:1.4;color:#888}
#case-study .case-example-note p{font-size:14px;line-height:1.4;letter-spacing:-.035em;margin:12px 0 16px}
#case-study .case-example-note>small{display:block;font-size:12px;line-height:1.4;color:#888}
#case-study .case-results{grid-template-rows:308px 288px;min-height:0}
#case-study .case-results>article,#case-study .case-results>figure{min-height:0;border-radius:var(--case-card-radius)}
#case-study .case-score{padding:40px}
#case-study .score-ring{width:123px;height:123px;margin-bottom:24px;background:conic-gradient(#e2e2e2 var(--score),#f5f5f5 0)}
#case-study .score-ring:before{inset:16px}
#case-study .score-ring strong{font-size:22px;font-weight:600}
#case-study .score-ring small{font-size:12px}
#case-study .case-score h3{font-size:16px;line-height:1.4;max-width:none;margin:0 0 7px}
#case-study .case-score p{font-size:14px;line-height:1.4;min-height:2.8em;max-width:260px;color:#808080}
#case-study .case-chart{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;justify-content:stretch;gap:9px;padding:30px}
#case-study .case-chart figcaption{position:absolute;left:30px;top:30px;z-index:1;display:flex;flex-direction:column;align-items:start;gap:4px;pointer-events:none}
#case-study .case-chart-heading{display:flex;align-items:center;gap:12px}
#case-study .case-chart figcaption strong{font-size:40px;line-height:1.1;font-weight:600;letter-spacing:-.06em;white-space:nowrap}
#case-study .case-chart figcaption strong small{font-size:.4em;margin-left:3px}
#case-study .case-period-badge{font-size:10px;line-height:1;padding:8px;border-radius:30px;background:#f5f5f5;white-space:nowrap}
#case-study .case-chart figcaption>span{font-size:12px;line-height:1.3;max-width:165px;color:#808080;margin:0}
#case-study .case-cumulative-bars{width:100%;height:100%;padding:0;gap:10px;min-height:0}
#case-study .case-cumulative-bars>div{position:relative;display:flex;flex-direction:row;align-items:end;justify-content:center;padding-bottom:23px;gap:0}
#case-study .case-cumulative-bars>div:nth-child(1){--bar-height:16.6667%}
#case-study .case-cumulative-bars>div:nth-child(2){--bar-height:33.3333%}
#case-study .case-cumulative-bars>div:nth-child(3){--bar-height:50%}
#case-study .case-cumulative-bars>div:nth-child(4){--bar-height:66.6667%}
#case-study .case-cumulative-bars>div:nth-child(5){--bar-height:83.3333%}
#case-study .case-cumulative-bars>div:nth-child(6){--bar-height:100%}
#case-study .time-bar{height:var(--bar-height);max-width:40px;min-height:36px;align-items:end;padding:0;border-radius:8px;overflow:hidden;background:#f5f5f5;color:#111;transition:none}
#case-study .case-cumulative-bars>div:last-child .time-bar{background:#0a0a0a;color:#fff}
#case-study .case-bar-label{display:flex;align-items:center;gap:2px;font-size:11px;line-height:1;white-space:nowrap;writing-mode:vertical-rl;transform:rotate(180deg);padding:6px 0}
#case-study .time-bar b{font-size:inherit;font-weight:600;line-height:1}
#case-study .case-cumulative-bars>div>small{position:absolute;bottom:0;font-size:12px;line-height:1.3;min-height:0;color:#808080}
#case-study .case-chart>p{font-size:9px;line-height:1.3;color:#888;max-width:none;margin:0}
@media(min-width:901px) and (max-width:1100px){
  #case-study{--case-card-inset:30px}
  #case-study .case-brand{font-size:64px}
  #case-study .case-time-comparison{font-size:24px;gap:3px}
  #case-study .case-score{padding:30px 24px}
  #case-study .case-score h3{font-size:14px}
  #case-study .case-score p{font-size:12px}
  #case-study .case-chart{padding:30px 22px}
  #case-study .case-chart figcaption{left:22px}
  #case-study .case-chart-heading{gap:5px}
  #case-study .case-chart figcaption strong{font-size:28px}
  #case-study .case-period-badge{font-size:9px;padding:6px}
  #case-study .case-chart figcaption>span{font-size:11px;max-width:125px}
  #case-study .case-cumulative-bars{gap:6px}
  #case-study .case-bar-label{font-size:10px}
}
@media(max-width:900px){
  #case-study{--case-card-inset:32px}
  #case-study .case-grid{height:auto}
  #case-study .case-visual{min-height:570px}
  #case-study .case-brand{font-size:64px}
  #case-study .case-time-comparison{font-size:30px}
  #case-study .case-results{height:308px;grid-template-rows:1fr}
  #case-study .case-score{padding:32px}
  #case-study .case-chart{padding-inline:30px!important}
}
@media(max-width:600px){
  #case-study{--case-card-radius:16px;--case-card-inset:26px}
  #case-study .case-visual{min-height:450px}
  #case-study .case-brand{font-size:clamp(56px,17vw,78px)}
  #case-study .case-top small{font-size:10px}
  #case-study .case-details{min-height:410px}
  #case-study .case-time-comparison{font-size:32px}
  #case-study .case-stat-label{margin-top:32px}
  #case-study .case-score{padding:26px 20px}
  #case-study .case-score h3{font-size:14px}
  #case-study .case-score p{font-size:12px}
  #case-study .case-chart{padding:26px 20px!important}
  #case-study .case-chart figcaption{top:26px;left:20px}
  #case-study .case-chart-heading{gap:8px}
  #case-study .case-chart figcaption strong{font-size:30px}
  #case-study .case-chart figcaption>span{font-size:11px;max-width:120px}
  #case-study .case-cumulative-bars{gap:7px}
  #case-study .case-bar-label{font-size:10px}
  #case-study .case-cumulative-bars>div>small{font-size:11px}
}
@media(max-width:480px){
  #case-study .case-results{height:auto;grid-template-columns:1fr;grid-template-rows:300px 300px}
  #case-study .case-score{padding:30px 26px}
  #case-study .case-score h3{font-size:16px}
  #case-study .case-score p{font-size:14px}
  #case-study .case-chart{padding:26px!important}
  #case-study .case-chart figcaption{left:26px}
  #case-study .case-chart figcaption strong{font-size:38px}
  #case-study .case-chart figcaption>span{font-size:12px;max-width:155px}
  #case-study .case-cumulative-bars{gap:10px}
  #case-study .case-bar-label{font-size:11px}
  #case-study .case-cumulative-bars>div>small{font-size:12px}
}
