/* THD focused case study */
.thd-heading{padding-top:28px}
.thd-heading .case-cover{margin-top:0}
.thd-loop{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;padding:21px 0;margin:26px 0 0;border-block:1px dotted #bbb;gap:22px}
.thd-loop li{font-size:12px;line-height:1.7;color:#666}
.thd-loop .dot{display:block;font-size:23px;color:#252525;line-height:1.2;margin-bottom:9px}
.case-tabs{display:flex;gap:26px;border-bottom:1px solid #ccc;margin-top:36px;position:sticky;top:0;z-index:4;background:#fff}
.case-tabs button{font-family:var(--serif);font-size:13px;padding:10px 0 13px;min-height:44px;color:#777;border-bottom:1px solid transparent;margin-bottom:-1px}
.case-tabs button[aria-selected=true]{color:#222;border-color:#222}
.thd-heading+.case-tabs{gap:clamp(12px,3vw,29px);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.thd-heading+.case-tabs button{flex:0 0 auto;white-space:nowrap;margin-bottom:0}
.thd-intent-list{list-style:none;padding:0;margin:28px 0 0}
.thd-intent-list>li{display:grid;grid-template-columns:55px 1fr;gap:24px;padding:21px 0;border-top:1px dotted #bbb;break-inside:avoid}
.thd-intent-list>li:last-child{border-bottom:1px dotted #bbb}
.thd-intent-list .dot{font-size:30px;font-weight:600;line-height:1.3;color:#777}
.thd-intent-list h4,.thd-design-tradeoff h4{font-family:var(--serif);font-size:17px;font-weight:400;line-height:1.65}
.thd-intent-list p{font-size:13px;line-height:1.9;color:#555;margin-top:7px;max-width:630px;word-break:keep-all;overflow-wrap:anywhere}
.thd-design-tradeoff{margin-top:22px;padding-top:16px;border-top:1px dotted #ccc}
.thd-early-ux{margin:0 0 28px}
.thd-ux-evolution{padding-left:20px;margin-top:16px}
.thd-ux-evolution strong{font-weight:500;color:#333}
.thd-ux-evolution p{margin-top:3px}
.thd-panel{padding-top:34px;outline-offset:8px;scroll-margin-top:50px}
.thd-panel>h2{font-size:24px;font-weight:650;margin-bottom:23px;line-height:1.2}
.thd-panel .table-wrap table{font-size:12px}
.thd-panel .table-wrap th,.thd-panel .table-wrap td{min-width:70px}
.thd-panel .table-wrap caption{font-size:11px}
.thd-panel .table-wrap table.thd-narrow{min-width:0;table-layout:fixed}
.thd-panel .table-wrap table.thd-narrow th:first-child{width:40%}
.thd-panel .chapter-copy{max-width:720px}
.thd-subtitle{font-family:var(--serif);font-size:23px;font-weight:400;line-height:1.6;margin-top:36px;letter-spacing:-.035em}
.thd-change{display:grid;grid-template-columns:1fr 1fr;gap:28px;border-block:1px dotted #bbb;padding:20px 0;margin-top:20px}
.thd-change>div>span{font-family:var(--serif);font-size:12px;color:#777}
.thd-change p{font-size:13px;line-height:1.85;margin-top:10px}
.thd-note{font-size:11px;line-height:1.85;color:#777;margin-top:14px;max-width:720px}
.thd-edit-log{list-style:none;padding:0;margin:25px 0 0}
.thd-edit-log li{display:grid;grid-template-columns:135px 1fr;gap:28px;padding:16px 0;border-bottom:1px dotted #ccc}
.thd-edit-log strong{font-family:var(--serif);font-weight:400;font-size:13px;line-height:1.8}
.thd-edit-log p{font-size:13px;line-height:1.85;color:#555}
.thd-hosting{display:grid;grid-template-columns:1fr 25px 1fr;gap:20px;align-items:center;border-block:1px dotted #bbb;margin-top:20px;padding:20px 0}
.thd-hosting .dot{font-size:24px;color:#333}
.thd-hosting p{font-size:12px;color:#666;margin-top:8px}
.thd-hosting>span{text-align:center;font-size:22px;font-family:var(--serif);color:#777}
.thd-record-chart{margin-top:24px}
.thd-record-chart img{width:100%;height:auto}
.thd-record-chart a{display:block}
.thd-record-chart figcaption{font-size:11px;line-height:1.8;margin-top:12px}
.thd-demo{margin-top:34px}
.thd-panel .asset-placeholder{margin-top:26px}
.thd-entry-comparison{margin-top:26px}
.thd-entry-columns{display:grid;grid-template-columns:1fr 1fr;gap:38px;padding:23px 0;border-block:1px dotted #bbb}
.thd-entry-columns section+section{border-left:1px dotted #ccc;padding-left:37px}
.thd-entry-columns h4{font-size:27px;font-weight:650;line-height:1.3}
.thd-entry-label{font-size:11px;color:#777;margin-top:8px;line-height:1.8}
.thd-entry-step{border:1px solid #ccc;padding:12px;text-align:center;font-family:var(--serif);font-size:14px;margin-top:23px}
.thd-entry-branches{display:grid;grid-template-columns:1fr 1fr;gap:17px;margin-top:22px}
.thd-entry-branches>div{text-align:center;border-top:1px dotted #bbb;padding-top:15px}
.thd-entry-branches span{font-family:var(--serif);font-size:14px}
.thd-entry-branches p{font-size:12px;line-height:2;margin-top:11px;color:#666}
.thd-entry-steps{list-style:none;padding:0;margin:23px 0 0}
.thd-entry-steps li{border:1px solid #bbb;padding:12px;text-align:center;position:relative;margin-top:18px}
.thd-entry-steps li:first-child{margin-top:0}
.thd-entry-steps li+li::before{content:'↓';position:absolute;top:-19px;left:calc(50% - 4px);color:#888;font-size:11px}
.thd-entry-steps span{display:block;font-family:var(--serif);font-size:14px;line-height:1.7}
.thd-entry-steps small{display:block;font-size:10px;color:#777;line-height:1.8;margin-top:4px}
.thd-entry-comparison figcaption,.thd-entry-screens figcaption,.thd-admin-screen figcaption,.thd-admin-mobile figcaption{font-size:10px;line-height:1.8;color:#777;margin-top:11px}
.thd-entry-screens{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:26px}
.thd-entry-screens a,.thd-admin-screen a,.thd-admin-mobile a{display:block}
.thd-entry-screens img,.thd-admin-screen img,.thd-admin-mobile img{width:100%;height:auto}
.thd-operations{margin-top:40px;padding-top:4px;border-top:1px dotted #aaa}
.thd-admin-screen{margin-top:25px}
.thd-admin-mobile{width:min(100%,300px);margin:25px auto 0}
@media(max-width:720px){
 .thd-heading{padding-top:24px}
 .thd-loop{gap:13px;padding-block:18px;margin-top:22px}
 .thd-loop li{font-size:10px;word-break:keep-all}
 .thd-loop .dot{font-size:20px;margin-bottom:8px}
 .case-tabs{gap:19px;margin-top:27px}
 .case-tabs button{font-size:11px;min-height:44px;padding:10px 0}
 .thd-panel{padding-top:27px}
 .thd-panel>h2{font-size:22px;margin-bottom:20px}
 .thd-subtitle{font-size:21px;margin-top:30px}
 .thd-intent-list>li{grid-template-columns:33px 1fr;gap:15px;padding:18px 0}
 .thd-intent-list .dot{font-size:25px}
 .thd-intent-list h4{font-size:16px}
 .thd-intent-list p{font-size:12px;line-height:1.9}
 .thd-change{grid-template-columns:1fr;gap:19px;padding-block:18px}
 .thd-change>div+div{border-top:1px dotted #ddd;padding-top:18px}
 .thd-change p{font-size:12px;margin-top:7px}
 .thd-change>div>span{font-size:11px}
 .thd-note{font-size:10px}
 .thd-edit-log li{grid-template-columns:1fr;gap:5px;padding:14px 0}
 .thd-edit-log strong{font-size:12px}
 .thd-edit-log p{font-size:12px}
 .thd-hosting{gap:13px}
 .thd-hosting .dot{font-size:22px}
 .thd-hosting p{font-size:11px}
 .thd-record-chart figcaption{font-size:10px}
 .thd-panel .table-wrap table{min-width:440px;font-size:11px}
 .thd-entry-columns{grid-template-columns:1fr;gap:27px;padding-block:20px}
 .thd-entry-columns section+section{border-left:0;border-top:1px dotted #ccc;padding-left:0;padding-top:25px}
 .thd-entry-columns h4{font-size:24px}
 .thd-entry-branches{gap:22px}.thd-entry-branches p{font-size:12px}
 .thd-entry-screens{grid-template-columns:1fr;gap:22px}
 .thd-operations{margin-top:33px}
}
@media(max-width:700px){.thd-heading+.case-tabs{flex-wrap:wrap;row-gap:0;column-gap:16px;overflow:visible}}
@media(max-width:370px){.case-tabs{gap:15px}.case-tabs button{font-size:10px}.thd-loop .dot{font-size:18px}}
@media print{.case-tabs{display:none}.thd-panel[hidden]{display:block!important}.thd-panel{break-before:page}.thd-loop,.thd-change,.thd-hosting{break-inside:avoid}.thd-panel .table-wrap table{min-width:0}.thd-record-chart img{max-height:350px;object-fit:contain}}

/* New cases use the same heading, copy, figure and change-log styles as existing panels. */
.thd-panel math{font-size:20px;margin:22px 0;text-align:left;overflow-x:auto}
.thd-panel .thd-content-table th:first-child{width:20%}
.thd-panel .thd-content-table th:nth-child(2){width:36%}

/* Scoped content additions; existing final typography and layout retained. */
.thd-role-line{font-size:14px;line-height:1.9;color:#555;margin-top:18px}
.thd-loop-lines{border-block:1px dotted #bbb;padding:15px 0;margin:20px 0 25px}.thd-loop-lines p{display:grid;grid-template-columns:80px 1fr;gap:18px;padding:6px 0;font-size:16px;line-height:1.8}.thd-loop-lines strong{font-weight:500}
.thd-case-links{display:grid;margin:28px 0;border-top:1px dotted #bbb}.thd-case-links a{padding:14px 0;border-bottom:1px dotted #bbb;font-family:var(--serif);font-size:16px}
.thd-work{border-left:2px solid #aaa;padding-left:16px;margin:24px 0;font-size:14px;line-height:1.9;color:#555}.thd-work strong{font-weight:500;color:#333}
@media(max-width:720px){.thd-loop-lines p{grid-template-columns:1fr;gap:3px}}

/* THD refinement: terminology, archive boundaries, and mobile overlap. */
.thd-archive{margin-top:38px;padding-top:18px;border-top:1px dotted #bbb}
.thd-archive-label{font-size:14px;color:#666;line-height:1.7;margin-bottom:10px}
.case-view:has(.thd-heading) .case-inline-meta{max-width:760px}
@media(max-width:720px){
 body:has(.thd-heading) .edge-note{position:static;writing-mode:horizontal-tb;display:block;margin:16px 24px 0 auto;width:max-content;padding:6px 8px;inset:auto}
 .thd-panel{scroll-margin-top:72px}
 .thd-panel>.table-wrap table.thd-narrow{min-width:440px}
}
