/* Content must fit inside its own component, not merely inside the page. */
.page,.page-top>div,.home-grid>*,.guide-links>*,.related-grid>*,.task-grid>*,.editor-intro>*,.editor-grid>*{min-width:0}
h1,h2,h3,p,li,summary,.button,.related-card,.guide-card,.reuse-links a{overflow-wrap:anywhere}
.button{max-width:100%;white-space:normal;text-align:center;line-height:1.5}
.related-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.purpose-links{margin-block:28px}
.related-card:has(>strong:first-child){display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0}
.related-card:has(>strong:first-child) strong{display:block;width:100%;font-size:1rem;line-height:1.5}
.related-card:has(>strong:first-child)>span:last-child{grid-column:auto;line-height:1.65}
.article .button.secondary{color:var(--ink);text-decoration:none}
.article .button.primary{color:white}
.article table{table-layout:fixed}
.article th,.article td{overflow-wrap:anywhere}
.presets{flex-wrap:wrap}
.presets button{flex:1 1 52px;min-height:36px}
.home-tag{max-width:calc(100% - 100px);white-space:normal;text-align:right}
.language-menu nav{max-width:calc(100vw - 32px)}
.footer-inner>*{min-width:0}
.footer-inner nav{flex-wrap:wrap}
.editor-intro{align-items:start}
.editor-drop{grid-column:1}.preset-panel{grid-column:2;grid-row:1 / span 2}
#quick-presets{grid-column:1;grid-row:2}
.editor-buttons .button{flex:0 1 auto;min-width:0;white-space:normal}
.editor-crop-panel>.editor-buttons:first-of-type{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.editor-crop-panel>.editor-buttons:first-of-type .button:last-child{grid-column:1/-1}
.editor-page .file-picker{display:inline-flex}
.editor-page label.choice-option{display:flex;margin:0;align-items:flex-start;gap:10px;font-size:.9rem;font-weight:400;line-height:1.5}
.choice-group{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px;margin:8px 0 18px}
.choice-option{padding:12px;border:1px solid #cbd5e4;border-radius:10px;background:#fff;cursor:pointer;min-width:0}
.choice-option input{width:18px!important;height:18px;min-height:0;margin:2px 0 0;flex:0 0 18px;accent-color:var(--blue)}
.choice-option span{min-width:0;overflow-wrap:anywhere}
.choice-option.is-selected{border-color:#244ee9;background:#eaf0ff}
.choice-option:has(input:focus-visible){outline:3px solid #80a3ff;outline-offset:2px}
.choice-option:has(input:disabled){opacity:.55;cursor:wait}
#batch-panel{margin:20px 0}#batch-cards img{max-height:220px}
#batch-queue .button{flex:0 1 auto;word-break:normal}
#batch-queue>div{min-width:0}#batch-queue>div>button:first-child{flex:1 1 auto}
#batch-queue>div>button:last-child{flex:0 0 44px}
#editor-result .editor-buttons{align-items:flex-start}
#editor-result .editor-buttons label{flex:0 0 100%;margin:4px 0 0}
#editor-result .editor-buttons select{flex:1 1 180px;min-width:0;width:100%;margin:0}
.editor-page .field-hint{margin:8px 0 16px}.editor-page .how p+p{margin-top:12px}
.analytics-consent{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
@media(max-width:1000px){.workspace{grid-template-columns:minmax(0,1fr)}.workspace,.benchmark-tool .workspace{grid-template-areas:"upload" "settings" "results";grid-template-rows:auto auto auto}.settings{grid-row:auto}.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.editor-intro,.editor-grid{grid-template-columns:minmax(0,1fr)}.editor-drop,.preset-panel,#quick-presets{grid-column:1;grid-row:auto}.preset-panel{padding:14px 16px}.related-grid{grid-template-columns:minmax(0,1fr)}.editor-buttons .button{flex:1 1 132px}.editor-crop-panel>.editor-buttons:first-of-type .button{padding:10px 8px;font-size:.85rem}.page{padding-inline:16px}.purpose-breadcrumb{padding-inline:16px}.editor-page h1{font-size:clamp(1.55rem,6vw,1.85rem);line-height:1.35}.task-card,.home-tool{min-width:0}.editor-page #batch-panel .editor-buttons>.button{flex-basis:100%}.editor-page .check{align-items:flex-start}.editor-page .check input{margin-top:3px}.editor-page output{float:none;margin-left:8px}}
@media(max-width:380px){.header-inner{padding-inline:14px;gap:8px}.brand{font-size:1.2rem}.language-menu summary{padding:8px;max-width:145px}.article h1{font-size:1.6rem}.editor-page .crop-numbers,.editor-page .dimension-grid{grid-template-columns:minmax(0,1fr)}.footer-inner>div>span{display:block;margin:6px 0 0}.analytics-actions button{flex-basis:100%;min-width:0}.choice-option{padding:10px}}

.sample-figure{margin:24px 0}.sample-figure img{display:block;width:100%;max-height:360px;object-fit:contain;border-radius:12px;background:repeating-conic-gradient(#edf0f5 0% 25%,#fff 0% 50%) 0/24px 24px}.sample-figure figcaption{margin-top:10px;font-size:.85rem;color:var(--muted);line-height:1.6}
