.geometry-figure{margin:20px auto;max-width:920px;padding:12px;border:1px solid var(--border,#c7d7e4);border-radius:18px;background:#f9fcff;color:#173348;box-sizing:border-box}
.geometry-figure__scroll{overflow-x:auto;overscroll-behavior-inline:contain;border-radius:10px}
.geometry-figure__scroll:focus-visible{outline:3px solid #2865bb;outline-offset:3px}
.geometry-svg{display:block;width:100%;height:auto;min-width:0;overflow:visible;font-family:"Segoe UI",Tahoma,Arial,sans-serif}
.geometry-figure.is-enlarged .geometry-svg{min-width:900px}.geometry-zoom{display:block;margin-inline-start:auto;background:#e8f0fb;color:#204f83;border:1px solid #bdcfe7;border-radius:8px;padding:7px 10px;cursor:pointer;font:inherit;font-size:12px}.geometry-zoom:focus-visible{outline:3px solid #2865bb;outline-offset:2px}
.geometry-svg .geometry-shape,.geometry-svg .geometry-mark{stroke:#244d72;stroke-width:2.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.geometry-svg .geometry-fill-blue{fill:#d8e9fb}.geometry-svg .geometry-fill-gold{fill:#fff0c7}.geometry-svg .geometry-fill-green{fill:#daf2e8}
.geometry-svg .geometry-vertex{font-size:24px;fill:#173348;font-weight:650;paint-order:stroke;stroke:#f9fcff;stroke-width:5px;stroke-linejoin:round}
.geometry-svg foreignObject{overflow:visible;pointer-events:none}
.geometry-label{height:70px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;font-size:24px;font-weight:600;line-height:1.25;color:#173348;text-shadow:0 1px 3px #fff}
.geometry-label .single-language-copy{font-size:inherit}.geometry-figure figcaption{font-size:12px;text-align:center;color:#536d80;margin-top:6px}
.geometry-admin{min-width:0}.geometry-admin h1{margin:4px 0 12px}.geometry-admin h2{font-size:21px}.geometry-admin p{line-height:1.8}.geometry-admin__hero{display:flex;align-items:center;gap:22px;padding:28px;margin-bottom:24px;border:1px solid var(--border,#cbd9e5);border-radius:24px;background:linear-gradient(120deg,#153b62,#275ea3);color:#fff}.geometry-admin__hero small{letter-spacing:1px;color:#c8defa}.geometry-admin__hero h1,.geometry-admin__hero p{color:inherit}.geometry-admin__symbol{font-size:74px;color:#f4d77c;line-height:1}
.geometry-admin__grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.geometry-admin .admin-card{min-width:0;padding:24px;margin-bottom:20px}.geometry-admin__setup form{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.geometry-admin__setup select{flex:1;min-width:180px;max-width:100%}.geometry-admin__downloads{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:18px 0}.geometry-admin__card{padding:22px 0;margin-top:20px;border-top:1px solid var(--border,#ccd9e5)}.geometry-admin__card small{overflow-wrap:anywhere}.geometry-admin__card form{margin-top:16px}.geometry-admin__items{padding-inline-start:24px}.geometry-admin__items>li{padding:14px 0}.geometry-admin__choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;list-style:none;padding:0}.geometry-admin__choices li{border:1px solid var(--border,#cedae6);border-radius:10px;padding:12px}.geometry-admin details{margin-top:14px}.geometry-admin summary{cursor:pointer;padding:8px 0;font-weight:650}.geometry-admin__confirm{position:sticky;bottom:12px;display:flex;gap:16px;align-items:center;flex-wrap:wrap;background:var(--surface,#fff);border:1px solid var(--border,#cbd9e5);box-shadow:0 8px 28px #142c4a26;border-radius:14px;padding:16px;z-index:2}.geometry-admin__bank-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;margin:22px 0}.geometry-admin .muted{font-size:13px;color:var(--muted,#52687b)}
.admin-workspace .geometry-admin__hero h1{color:#fff}
.geometry-lesson-preview{margin-top:22px;padding-top:18px;border-top:1px solid var(--line,#ccd9e5);min-width:0}
.geometry-lesson-preview .geometry-admin__confirm{position:static;margin-top:18px}
.geometry-lesson-preview .geometry-admin__choices{grid-template-columns:minmax(0,1fr)}
.geometry-lesson-preview .geometry-admin__card{min-width:0;overflow-wrap:anywhere}
.geometry-lesson-notice{padding:12px;border:1px solid var(--line,#ccd9e5);border-radius:10px;color:var(--muted,#52687b)}
.passage-direct-card .map-review-row>header{flex-wrap:wrap}
.passage-direct-card .map-review-row>header>b{width:auto;min-width:36px;max-width:100%;height:auto;min-height:36px;flex:0 1 auto;padding:6px 10px;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;line-height:1.35;text-align:center}
.passage-direct-card .map-review-row>header>span{flex:0 0 auto}
@media(max-width:700px){.passage-direct-card .map-review-row>header>b{min-width:32px;min-height:32px}}
@media(max-width:760px){.geometry-admin__grid{grid-template-columns:1fr;gap:0}.geometry-admin__hero{padding:20px;gap:12px}.geometry-admin__symbol{font-size:45px}.geometry-admin .admin-card{padding:18px}.geometry-admin__choices{grid-template-columns:1fr}.geometry-admin__setup form{align-items:stretch;flex-direction:column}.geometry-figure{padding:8px;margin:14px 0}.geometry-svg .geometry-vertex,.geometry-label{font-size:34px}.geometry-admin__confirm{position:static}.geometry-figure.is-enlarged .geometry-svg{min-width:700px}}
@media print{.geometry-figure{break-inside:avoid;box-shadow:none;background:white;max-width:100%;border:0}.geometry-figure__scroll{overflow:visible}.geometry-figure .geometry-svg{min-width:0;width:100%}.geometry-zoom{display:none}.geometry-admin__hero,.geometry-admin__setup,.geometry-admin__grid,.geometry-admin__confirm{display:none}}

/* Interactive coordinate construction */
.dilation-plane{display:block;width:min(100%,560px);height:auto;margin-inline:auto;direction:ltr}
.dilation-board{border:1px solid #b9cee2;border-radius:14px;background:#f7fbff;overflow:hidden}
.dilation-board svg{cursor:crosshair;touch-action:pan-y;user-select:none}
.dilation-widget{display:grid;gap:12px}
.dilation-widget [hidden]{display:none}
.dilation-widget p{margin:0}
.dilation-legend,.dilation-vertices,.dilation-actions,.dilation-coordinate-row,.dilation-checks{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.dilation-legend span{padding:4px 9px;border-radius:8px;background:var(--surface-soft,#edf4fb)}
.dilation-legend .dilation-original{background:#e1edf9;color:#174d86}
.dilation-legend .dilation-attempt{background:#efe7fb;color:#663594}
.dilation-vertices button{min-height:42px;padding:5px 10px;border-radius:8px;border:1px solid #b8a5d3;background:#f5eefb;color:#47266b}
.dilation-vertices button[aria-pressed="true"]{background:#5e3b86;color:#fff}
.dilation-vertices bdi{font-size:.9em;margin-inline-start:4px}
.dilation-actions{justify-content:space-between}
.dilation-actions button{min-height:44px}
.dilation-manual summary{cursor:pointer}
.dilation-coordinate-row{margin-block:8px;justify-content:flex-start}
.dilation-coordinate-row input{width:5.5em;max-width:25vw;min-height:40px;padding:3px 6px}
.dilation-result{padding:12px;border:1px solid #a8c1cf;border-radius:12px}
.dilation-result h3,.dilation-result p{margin:0 0 9px}
.dilation-checks{padding:0;list-style:none}
.dilation-checks li{padding:5px 9px;border-radius:8px;background:#e6f6ef;color:#075b44}
.dilation-checks li.is-wrong{background:#ffedf0;color:#8a2339}

.dilation-coordinate{display:inline-block;white-space:nowrap}

/* Keep graded geometry choices distinct from the neutral and selected states. */
[data-geometry-question] .focused-choices > .passage-choice-correct {
  --geometry-choice-bg:#ddf5e9;
  --geometry-choice-text:#12563b;
  --geometry-choice-edge:#23865f;
  --geometry-choice-badge:#14764e;
}
[data-geometry-question] .focused-choices > .passage-choice-wrong {
  --geometry-choice-bg:#fce4e8;
  --geometry-choice-text:#8d2339;
  --geometry-choice-edge:#ce566e;
  --geometry-choice-badge:#ab2d48;
}
html[data-theme="dark"] [data-geometry-question] .focused-choices > .passage-choice-correct {
  --geometry-choice-bg:#173c32;
  --geometry-choice-text:#bcf3d7;
  --geometry-choice-edge:#56c294;
}
html[data-theme="dark"] [data-geometry-question] .focused-choices > .passage-choice-wrong {
  --geometry-choice-bg:#4c2935;
  --geometry-choice-text:#ffd1d8;
  --geometry-choice-edge:#f18494;
}
[data-geometry-question] .focused-choices > :is(.passage-choice-correct,.passage-choice-wrong) {
  background:var(--geometry-choice-bg);
  color:var(--geometry-choice-text);
  border-color:var(--geometry-choice-edge);
  border-inline-start-width:3px;
  box-shadow:none;
  cursor:default;
}
[data-geometry-question] .focused-choices > :is(.passage-choice-correct,.passage-choice-wrong) :is([data-choice-copy],.single-language-copy,.admin-preview-language-pair > span) {
  color:inherit;
}
[data-geometry-question] .focused-choices > :is(.passage-choice-correct,.passage-choice-wrong) > i {
  background:var(--geometry-choice-badge);
  color:#fff;
}

/* Numbered dilation grids use solid paths for axes and dashed paths for grid lines. */
.geometry-svg:is([aria-label*="Unit grid (1 × 1)"], [aria-label*="شبكة مربعات (١ × ١)"]) > path.geometry-shape:not([stroke-dasharray]) {
  stroke:#c62828;
  stroke-width:3.5;
}
