/* ES Pole Groundline Moment — every rule scoped to .es-glm (root, guide portal, modal portal). */
.es-glm {
	--navy: #1F3864;
	--navy-2: #2b4a80;
	--amber: #C9A21A;
	--amber-soft: #fbf0c6;
	--ink: #1d2433;
	--muted: #5d6677;
	--line: #dfe3ea;
	--bg: #f6f7fa;
	--ok: #1f7a4a;
	--warn: #a86b00;
	--bad: #b3261e;
	--es-glm-sticky-top: 0px;
	font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink);
	box-sizing: border-box;
	margin-bottom: 2rem;
}
.es-glm *, .es-glm *::before, .es-glm *::after { box-sizing: border-box; }
.es-glm button { font-family: inherit; }

/* ---------- Toolbar ---------- */
.es-glm .es-glm-toolbar {
	position: sticky; top: var(--es-glm-sticky-top); z-index: 30;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
	background: var(--navy); color: #fff;
	border-radius: 10px; padding: 0.55rem 0.8rem; margin: 0 0 1rem;
	box-shadow: 0 4px 14px rgba(31, 56, 100, 0.18);
}
.es-glm .es-glm-tb-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.es-glm .es-glm-tb-title strong { font-size: 1rem; }
.es-glm .es-glm-tb-title span { font-size: 0.78rem; color: #c9d3e6; }
.es-glm .es-glm-tb-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.es-glm .es-glm-toolbar select {
	font: inherit; font-size: 0.85rem; border-radius: 7px; border: 1px solid rgba(255,255,255,0.35);
	background: rgba(255,255,255,0.1); color: #fff; padding: 0.38rem 0.5rem; max-width: 260px;
}
.es-glm .es-glm-toolbar select option { color: var(--ink); }
.es-glm .es-glm-toolbar .es-glm-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.es-glm .es-glm-toolbar .es-glm-btn-ghost:hover { border-color: #fff; color: #fff; }
.es-glm .es-glm-guide-btn { display: none; }
.es-glm.is-sheet .es-glm-guide-btn { display: inline-block; }

/* ---------- Buttons ---------- */
.es-glm .es-glm-btn {
	font-weight: 600; font-size: 0.88rem; line-height: 1.2; cursor: pointer;
	border-radius: 7px; padding: 0.45rem 0.9rem; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.es-glm .es-glm-btn-primary { background: var(--amber); border-color: var(--amber); color: #1d2433; }
.es-glm .es-glm-btn-primary:hover { background: #b8930f; border-color: #b8930f; }
.es-glm .es-glm-btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.es-glm .es-glm-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.es-glm .es-glm-mini {
	font-size: 0.76rem; font-weight: 600; cursor: pointer; white-space: nowrap;
	border: 1px solid var(--line); background: var(--bg); color: var(--navy); border-radius: 6px; padding: 0.22rem 0.5rem;
}
.es-glm .es-glm-mini:hover { border-color: var(--navy); }
.es-glm .es-glm-mini.is-bad { color: var(--bad); }
.es-glm .es-glm-link { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }

/* ---------- Layout ---------- */
.es-glm .es-glm-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28%, 400px); gap: 1.25rem; align-items: start; }
.es-glm.is-sheet .es-glm-layout { grid-template-columns: minmax(0, 1fr); }
.es-glm .es-glm-main { min-width: 0; }
.es-glm .es-glm-lede { color: var(--muted); margin: 0 0 1rem; }

.es-glm .es-glm-aside {
	position: sticky; top: calc(var(--es-glm-sticky-top) + 72px);
	max-height: calc(100vh - var(--es-glm-sticky-top) - 90px);
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.es-glm .es-glm-aside-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--navy); }
.es-glm .es-glm-aside-close { display: none; background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.es-glm .es-glm-aside-body { overflow-y: auto; padding: 0.9rem 1rem 1.2rem; font-size: 0.88rem; }

/* sheet mode: aside lives in a body-level portal */
.es-glm.es-glm-portal { position: fixed; inset: 0; z-index: 100000; pointer-events: none; margin: 0; }
.es-glm.es-glm-portal .es-glm-scrim { position: absolute; inset: 0; background: rgba(15, 24, 42, 0.45); opacity: 0; transition: opacity 0.2s; }
.es-glm.es-glm-portal .es-glm-aside {
	position: absolute; left: 0; right: 0; bottom: 0; top: auto; max-height: 78vh;
	border-radius: 14px 14px 0 0; transform: translateY(105%); transition: transform 0.22s ease; box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
}
.es-glm.es-glm-portal.is-open { pointer-events: auto; }
.es-glm.es-glm-portal.is-open .es-glm-scrim { opacity: 1; }
.es-glm.es-glm-portal.is-open .es-glm-aside { transform: translateY(0); }
.es-glm.es-glm-portal .es-glm-aside-close { display: block; }

/* ---------- Cards ---------- */
.es-glm .es-glm-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem 1.15rem; margin: 0 0 1rem; }
.es-glm .es-glm-h {
	font-size: 1.02rem; font-weight: 700; color: var(--navy); margin: 0 0 0.85rem; padding-bottom: 0.3rem;
	border-bottom: 2px solid var(--amber); display: inline-flex; align-items: center; gap: 0.45rem;
}
.es-glm .es-glm-num { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--navy); color: #fff; font-size: 0.78rem; font-family: "JetBrains Mono", monospace; }
.es-glm .es-glm-note { font-size: 0.84rem; color: var(--muted); margin: -0.2rem 0 0.8rem; }
.es-glm .es-glm-sub { font-weight: 600; color: var(--navy); font-size: 0.9rem; margin: 0.9rem 0 0.4rem; }

.es-glm .es-glm-cardgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 1rem; align-items: start; }
.es-glm.is-narrow .es-glm-cardgrid { grid-template-columns: minmax(0, 1fr); }
.es-glm .es-glm-fig { margin: 0; position: sticky; top: calc(var(--es-glm-sticky-top) + 72px); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0.4rem; }
.es-glm.is-narrow .es-glm-fig { position: static; }
.es-glm .es-glm-svg { display: block; width: 100%; height: auto; margin: 0 auto; }
.es-glm .es-glm-figmsg { font-size: 0.8rem; color: var(--bad); padding: 0 0.3rem; min-height: 0; }

/* ---------- Fields ---------- */
.es-glm .es-glm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.7rem 0.9rem; margin-bottom: 0.4rem; }
.es-glm .es-glm-field { display: flex; flex-direction: column; gap: 0.22rem; min-width: 0; }
.es-glm .es-glm-field.is-hidden { display: none; }
.es-glm .es-glm-lab { display: flex; align-items: center; justify-content: space-between; gap: 0.3rem; font-size: 0.8rem; font-weight: 500; color: var(--ink); }
.es-glm .es-glm-lab label, .es-glm .es-glm-lab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-glm .es-glm-q {
	flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted);
	font-size: 0.7rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; display: inline-grid; place-items: center;
}
.es-glm .es-glm-q:hover, .es-glm .es-glm-q.is-active { background: var(--amber); border-color: var(--amber); color: #1d2433; }
.es-glm .es-glm-in { position: relative; display: flex; align-items: stretch; }
.es-glm .es-glm-in input, .es-glm .es-glm-in select, .es-glm .es-glm-rowhead input, .es-glm .es-glm-pthead input, .es-glm .es-glm-casehead input, .es-glm .es-glm-holehead input, .es-glm .es-glm-parthead input,
.es-glm .es-glm-custom input, .es-glm .es-glm-mfield input {
	font: inherit; font-size: 0.9rem; width: 100%; min-width: 0; margin: 0;
	padding: 0.42rem 0.55rem; border: 1px solid #c9cfda; border-radius: 6px; background: #fff; color: var(--ink);
}
.es-glm .es-glm-in input[type="number"], .es-glm .es-glm-custom input[type="number"] { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 0.86rem; padding-right: 3.2rem; }
.es-glm .es-glm-custom input[type="number"] { padding-right: 0.4rem; }
.es-glm .es-glm-unit { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 0.74rem; color: var(--muted); pointer-events: none; background: #fff; padding-left: 0.2rem; }
.es-glm input:focus, .es-glm select:focus { outline: 2px solid rgba(201, 162, 26, 0.5); outline-offset: 0; border-color: var(--amber); }
.es-glm .es-glm-field.is-active .es-glm-in input, .es-glm .es-glm-field.is-active .es-glm-in select { background: var(--amber-soft); }
.es-glm .es-glm-field.is-active .es-glm-unit { background: var(--amber-soft); }
.es-glm .is-missing { border-color: var(--bad) !important; background: #fdecea !important; }
.es-glm .is-flash { animation: es-glm-flash 0.9s ease; }
@keyframes es-glm-flash { 0% { background: var(--amber); } 100% { background: #fff; } }

.es-glm .es-glm-field-seg { margin-bottom: 0.7rem; }
.es-glm .es-glm-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); align-self: flex-start; }
.es-glm .es-glm-seg label { position: relative; cursor: pointer; }
.es-glm .es-glm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.es-glm .es-glm-seg span { display: block; padding: 0.38rem 0.85rem; font-size: 0.85rem; font-weight: 500; color: var(--ink); border-right: 1px solid var(--line); }
.es-glm .es-glm-seg label:last-child span { border-right: 0; }
.es-glm .es-glm-seg input:checked + span { background: var(--navy); color: #fff; }
.es-glm .es-glm-seg input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: -2px; }
.es-glm .es-glm-chk { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; cursor: pointer; }
.es-glm .es-glm-field-chk { flex-direction: row; align-items: center; justify-content: space-between; }
.es-glm .es-glm-switch { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; cursor: pointer; user-select: none; }

/* ---------- Attachment rows and load cases ---------- */
.es-glm .es-glm-item { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 10px; padding: 0.7rem 0.8rem 0.8rem; margin-bottom: 0.7rem; background: #fff; }
.es-glm .es-glm-item.is-current { border-left-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.es-glm .es-glm-item.is-bad { border-left-color: var(--bad); }
.es-glm .es-glm-item.is-off { opacity: 0.6; }
.es-glm .es-glm-rowhead, .es-glm .es-glm-pthead, .es-glm .es-glm-casehead, .es-glm .es-glm-holehead, .es-glm .es-glm-parthead { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.6rem; }
.es-glm .es-glm-rowhead input, .es-glm .es-glm-pthead input, .es-glm .es-glm-casehead input[type="text"], .es-glm .es-glm-holehead input, .es-glm .es-glm-parthead input { flex: 1 1 auto; font-weight: 600; }
.es-glm .es-glm-badge { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--navy); color: #fff; font: 600 0.78rem "JetBrains Mono", monospace; }
.es-glm .es-glm-casebadge { background: var(--amber); color: #1d2433; border-radius: 6px; padding: 0 0.4rem; }
.es-glm .es-glm-item .es-glm-fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.55rem 0.7rem; }
.es-glm .es-glm-item .es-glm-lab { font-size: 0.76rem; }
.es-glm .es-glm-lfrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.4rem; }
.es-glm .es-glm-lfrow .es-glm-in input { padding-right: 0.4rem; }
.es-glm .es-glm-lfh { font-size: 0.78rem; font-weight: 600; color: var(--navy); margin: 0.55rem 0 0; display: flex; align-items: center; gap: 0.3rem; }
.es-glm .es-glm-addcase { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto; gap: 0.6rem; align-items: end; margin-bottom: 0.9rem; padding: 0.7rem; background: var(--bg); border-radius: 10px; }
.es-glm.is-small .es-glm-addcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.es-glm.is-small .es-glm-lfrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.es-glm.is-narrow:not(.is-small) .es-glm-lfrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.es-glm .es-glm-empty { color: var(--muted); font-size: 0.88rem; padding: 0.6rem; border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- Tables ---------- */
.es-glm .es-glm-details summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.es-glm .es-glm-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.4rem 0; }
.es-glm .es-glm-table { border-collapse: collapse; width: 100%; font-size: 0.84rem; margin: 0; }
.es-glm .es-glm-table th, .es-glm .es-glm-table td { border-bottom: 1px solid var(--line); padding: 0.38rem 0.5rem; text-align: right; white-space: nowrap; }
.es-glm .es-glm-table th:first-child, .es-glm .es-glm-table td:first-child { text-align: left; }
.es-glm .es-glm-table thead th { background: var(--bg); color: var(--navy); font-weight: 600; font-size: 0.78rem; border-bottom: 2px solid var(--line); }
.es-glm .es-glm-table td { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.es-glm .es-glm-table td.t { font-family: inherit; font-size: 0.84rem; white-space: normal; min-width: 8rem; }
.es-glm .es-glm-table tr.is-gov td { background: var(--amber-soft); }
.es-glm .es-glm-table tr.is-total td { font-weight: 700; border-top: 2px solid var(--navy); }
.es-glm .es-glm-custom td { padding: 0.2rem; }
.es-glm .es-glm-custom input { padding: 0.3rem 0.4rem; font-size: 0.8rem; min-width: 64px; }
.es-glm .es-glm-tag { display: inline-block; font: 700 0.66rem "IBM Plex Sans", sans-serif; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 4px; padding: 0.08rem 0.4rem; margin-left: 0.35rem; vertical-align: middle; }
.es-glm .es-glm-tag.ok { background: #e3f3ea; color: var(--ok); }
.es-glm .es-glm-tag.warn { background: #fff1d6; color: var(--warn); }
.es-glm .es-glm-tag.bad { background: #fdecea; color: var(--bad); }
.es-glm .es-glm-tag.gov { background: var(--amber); color: #1d2433; }

/* ---------- Results ---------- */
.es-glm .es-glm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin: 0.2rem 0 0.4rem; }
.es-glm .es-glm-loading { visibility: hidden; min-height: 2rem; display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.88rem; }
.es-glm.is-busy .es-glm-loading { visibility: visible; }
.es-glm .es-glm-spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: es-glm-spin 0.8s linear infinite; }
@keyframes es-glm-spin { to { transform: rotate(360deg); } }
.es-glm .es-glm-error { background: #fdecea; color: var(--bad); border: 1px solid #f3c1bc; border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
.es-glm .es-glm-warn { margin-bottom: 1rem; }
.es-glm .es-glm-warn p { background: #fff7e0; border: 1px solid #ecd58b; color: #6b4c00; border-radius: 9px; padding: 0.55rem 0.8rem; margin: 0 0 0.5rem; font-size: 0.86rem; }

.es-glm .es-glm-hero { border: 2px solid var(--amber); background: linear-gradient(180deg, #fffaf0, #fff); }
.es-glm .es-glm-hero-k { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.es-glm .es-glm-hero-v { font: 600 2.2rem/1.15 "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; color: var(--navy); margin: 0.2rem 0; }
.es-glm .es-glm-hero-sub { font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; font-size: 0.92rem; color: var(--ink); }
.es-glm .es-glm-hero-ctx { color: var(--muted); font-size: 0.86rem; margin: 0.45rem 0 0.4rem; }

.es-glm .es-glm-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.es-glm .es-glm-tab { font-size: 0.82rem; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 0.28rem 0.8rem; cursor: pointer; }
.es-glm .es-glm-tab.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.es-glm .es-glm-fig-res { position: static; margin-bottom: 0.6rem; }
.es-glm .es-glm-fig-res .es-glm-svg { margin: 0 auto; }
.es-glm .es-glm-tree { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 0.6rem; align-items: start; }
.es-glm.is-small .es-glm-tree { grid-template-columns: minmax(0, 1fr); }


.es-glm .es-glm-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.35rem 1.2rem; }
.es-glm .es-glm-kv div { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.84rem; border-bottom: 1px dotted var(--line); padding: 0.2rem 0; }
.es-glm .es-glm-kv b { font: 500 0.82rem "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }

.es-glm .es-glm-steps-card { display: none; }
.es-glm.es-glm-show-steps .es-glm-steps-card { display: block; }
.es-glm .es-glm-steps h4 { color: var(--navy); font-size: 0.92rem; margin: 1rem 0 0.35rem; }
.es-glm .es-glm-steps h4:first-child { margin-top: 0; }
.es-glm .es-glm-steps ol { list-style: none; margin: 0; padding: 0; font: 0.76rem/1.6 "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.es-glm .es-glm-steps li { white-space: pre-wrap; word-break: break-word; }
.es-glm .es-glm-steps li.is-sec { font-weight: 600; color: var(--navy); margin-top: 0.3rem; }
.es-glm .es-glm-disclaimer { font-size: 0.78rem; color: var(--muted); margin: 0.6rem 0 0; }

/* ---------- Guide topics ---------- */
.es-glm .es-glm-topic h3 { font-size: 1rem; color: var(--navy); margin: 0.2rem 0 0.4rem; }
.es-glm .es-glm-topic h4 { font-size: 0.88rem; color: var(--navy); margin: 0.9rem 0 0.3rem; }
.es-glm .es-glm-topic p, .es-glm .es-glm-topic ul, .es-glm .es-glm-topic ol { margin: 0 0 0.6rem; }
.es-glm .es-glm-topic ul, .es-glm .es-glm-topic ol { padding-left: 1.15rem; }
.es-glm .es-glm-ref { font-size: 0.78rem; color: var(--muted); border-left: 3px solid var(--amber); padding-left: 0.5rem; }
.es-glm .es-glm-back { font-size: 0.8rem; color: var(--navy); text-decoration: none; font-weight: 600; }
.es-glm .es-glm-eq { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; background: var(--bg); border-radius: 6px; padding: 0.45rem 0.6rem; }
.es-glm .es-glm-qi { display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--line); font-size: 0.65rem; font-weight: 700; }
.es-glm .es-glm-mt { border-collapse: collapse; width: 100%; font-size: 0.78rem; margin: 0.3rem 0 0.7rem; }
.es-glm .es-glm-mt th, .es-glm .es-glm-mt td { border-bottom: 1px solid var(--line); padding: 0.25rem 0.35rem; text-align: left; }
.es-glm .es-glm-mt th { color: var(--navy); background: var(--bg); }
.es-glm .es-glm-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.7rem; }
.es-glm .es-glm-chip { font-size: 0.78rem; font-weight: 500; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 0.25rem 0.65rem; cursor: pointer; }
.es-glm .es-glm-chip:hover { border-color: var(--amber); background: var(--amber-soft); }
.es-glm .es-glm-chiphead { font-size: 0.74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0.6rem 0 0; }

/* ---------- Modal (body-level portal) ---------- */
.es-glm.es-glm-modal { position: fixed; inset: 0; z-index: 100001; background: rgba(15, 24, 42, 0.5); display: flex; align-items: center; justify-content: center; padding: 1rem; margin: 0; }
.es-glm.es-glm-modal[hidden], .es-glm .es-glm-modal[hidden] { display: none; }
.es-glm .es-glm-modal-box { background: #fff; border-radius: 12px; padding: 1.1rem 1.25rem; width: 100%; max-width: 440px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.es-glm .es-glm-mfield { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.82rem; margin-bottom: 0.6rem; }
.es-glm .es-glm-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; }

/* ---------- v2.0 additions ---------- */
.es-glm .es-glm-field-wide { grid-column: span 2; }
.es-glm.is-small .es-glm-field-wide { grid-column: auto; }
.es-glm .es-glm-hero.is-fail { border-color: var(--bad); background: linear-gradient(180deg, #fdecea, #fff); }
.es-glm .es-glm-hero.is-fail .es-glm-hero-v { color: var(--bad); }
.es-glm .es-glm-in input[type="text"] { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.86rem; }

/* ---------- v2.1 additions ---------- */
.es-glm .es-glm-in input.is-auto { background: var(--bg); color: var(--muted); }
.es-glm .es-glm-field.is-over .es-glm-in input { border-color: var(--amber); background: var(--amber-soft); font-weight: 600; }
.es-glm .es-glm-field.is-over .es-glm-lab label::after { content: " *"; color: var(--warn); }
.es-glm .es-glm-lfreset { margin-left: auto; }
.es-glm .es-glm-lfh .es-glm-lfreset[hidden] { display: none; }
.es-glm .es-glm-item.es-glm-cond { border-left-color: var(--amber); }
.es-glm .es-glm-condbadge { background: var(--amber); color: #1d2433; border-radius: 6px; padding: 0 0.4rem; }
.es-glm .es-glm-rowhead select.es-glm-from { flex: 0 0 auto; width: auto; max-width: 11rem; font: inherit; font-size: 0.82rem; padding: 0.35rem 0.4rem; border: 1px solid #c9cfda; border-radius: 6px; background: #fff; }
.es-glm .es-glm-libbox { margin-top: 0.8rem; }
.es-glm .es-glm-customs:empty { display: none; }
.es-glm .es-glm-field-chk { align-self: end; min-height: 2.2rem; }

/* ---------- v2.2: framing button, issue list, plan figures ---------- */
.es-glm .es-glm-rowbar { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.75rem; flex-wrap: wrap; }
.es-glm .es-glm-fr-open { border-style: dashed; }
.es-glm .es-glm-fr-open::before { content: "⚙"; margin-right: 0.35rem; }
.es-glm .es-glm-fr-open.is-on { background: var(--amber-soft); border-color: var(--amber); border-style: solid; color: var(--navy); }
.es-glm .es-glm-errsum { background: #fdecea; color: var(--bad); border: 1px solid #f3c1bc; border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
.es-glm .es-glm-errsum .es-glm-link { color: var(--bad); font-weight: 600; }
.es-glm .es-glm-issuelist { list-style: none; padding: 0 !important; margin: 0.4rem 0 0; counter-reset: iss; }
.es-glm .es-glm-issuelist li { margin: 0 0 0.45rem; counter-increment: iss; }
.es-glm .es-glm-issue { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.4rem; width: 100%; text-align: left; background: #fff; border: 1px solid #f3c1bc; border-left: 4px solid var(--bad); border-radius: 8px; padding: 0.5rem 0.6rem; cursor: pointer; font: inherit; color: var(--ink); }
.es-glm .es-glm-issue::before { content: counter(iss); grid-row: span 2; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--bad); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.es-glm .es-glm-issue:hover, .es-glm .es-glm-issue:focus-visible { background: #fdf3f2; outline: none; border-color: var(--bad); }
.es-glm .es-glm-issue-w { font-size: 0.78rem; color: var(--muted); }
.es-glm .es-glm-issue-m { font-size: 0.88rem; font-weight: 600; color: var(--bad); }
.es-glm .es-glm-issuelist li.is-done .es-glm-issue { border-color: #b9dcc7; border-left-color: var(--ok); opacity: 0.75; }
.es-glm .es-glm-issuelist li.is-done .es-glm-issue::before { content: "✓"; background: var(--ok); }
.es-glm .es-glm-issuelist li.is-done .es-glm-issue-m { color: var(--ok); text-decoration: line-through; }
.es-glm .es-glm-fig-plan { align-self: start; }

/* ---------- v2.3: point loads, view toggle, 3D ---------- */
.es-glm .es-glm-ptbadge { background: #0f766e; border-radius: 6px; padding: 0 0.4rem; }
.es-glm .es-glm-pts:empty { display: none; }
.es-glm .es-glm-pts .es-glm-item { border-left-color: #0f766e; }
.es-glm .es-glm-figbar { display: flex; gap: 0.25rem; margin: 0 0 0.35rem; }
.es-glm .es-glm-vbtn { font: 600 0.78rem "IBM Plex Sans", system-ui, sans-serif; padding: 0.25rem 0.7rem; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; cursor: pointer; }
.es-glm .es-glm-vbtn.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.es-glm .es-glm-3dbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-top: 0.35rem; justify-content: center; }
.es-glm .es-glm-3dbar button { font: 500 0.76rem "IBM Plex Sans", system-ui, sans-serif; padding: 0.2rem 0.6rem; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 6px; cursor: pointer; }
.es-glm .es-glm-3dbar button:hover { border-color: var(--navy); }
.es-glm .es-glm-3dbar span { font-size: 0.74rem; color: var(--muted); margin-left: 0.3rem; }
.es-glm .es-glm-svg-3d { background: linear-gradient(#fbfcfe, #f3f5f9); border-radius: 8px; user-select: none; -webkit-user-select: none; }
.es-glm .es-glm-fig-3d { margin-top: 0.6rem; }
.es-glm .es-glm-srctable { margin-top: 0.6rem; max-width: 640px; }
.es-glm .es-glm-3dbar .es-glm-3dreset { border-color: var(--navy); font-weight: 600; }
.es-glm .es-glm-3dbar [data-zoom] { min-width: 1.9rem; font-weight: 700; }

/* 3D toolbar: compact and immune to theme button styles */
.es-glm .es-glm-3dbar button { font-size: 12px !important; line-height: 1.2 !important; padding: 4px 9px !important; min-height: 0 !important; height: auto !important; border-radius: 6px !important; box-shadow: none !important; text-transform: none !important; letter-spacing: 0 !important; margin: 0 !important; }
.es-glm .es-glm-3dbar span { font-size: 11px !important; line-height: 1.3; }
.es-glm.is-small .es-glm-3dbar span { flex-basis: 100%; text-align: center; margin-left: 0; }

/* ---------- v2.5: tabbed layout on large screens ---------- */
.es-glm .es-glm-steptabs, .es-glm .es-glm-stepnav, .es-glm .es-glm-restabs { display: none; }
.es-glm.is-tabbed .es-glm-steptabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.es-glm .es-glm-steptab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 7px !important; border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer; font: 500 13px/1.2 "IBM Plex Sans", system-ui, sans-serif !important; color: var(--ink); text-transform: none !important; letter-spacing: 0 !important; box-shadow: none !important; margin: 0 !important; min-height: 0 !important; }
.es-glm .es-glm-steptab:hover { background: #f3f6fb; }
.es-glm .es-glm-stepnum { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #e6ebf3; color: var(--navy); font: 700 12px/1 "IBM Plex Sans", system-ui, sans-serif; }
.es-glm .es-glm-steptab.is-on { background: var(--navy); color: #fff; }
.es-glm .es-glm-steptab.is-on .es-glm-stepnum { background: #fff; color: var(--navy); }
.es-glm .es-glm-stepbad { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 11px/18px "IBM Plex Sans", system-ui, sans-serif; text-align: center; }
.es-glm .es-glm-steptab.has-bad:not(.is-on) { border-color: #f3c1bc; }
.es-glm.is-tabbed .es-glm-form > .es-glm-card.is-off { display: none; }
.es-glm.is-tabbed .es-glm-stepnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 16px; }
.es-glm .es-glm-stepcount { font-size: 13px; color: var(--muted); text-align: center; flex: 1 1 auto; }
.es-glm .es-glm-stepprev[disabled] { opacity: 0.4; cursor: default; }
.es-glm.is-tabbed .es-glm-form > .es-glm-card { min-height: 260px; }
/* results */
.es-glm.is-tabbed .es-glm-restabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 2px solid var(--line); }
.es-glm .es-glm-restab { padding: 8px 16px !important; border: 0; border-bottom: 3px solid transparent; margin: 0 0 -2px !important; background: transparent; cursor: pointer; font: 600 14px/1.2 "IBM Plex Sans", system-ui, sans-serif !important; color: var(--muted); text-transform: none !important; letter-spacing: 0 !important; box-shadow: none !important; border-radius: 0 !important; min-height: 0 !important; }
.es-glm .es-glm-restab.is-on { color: var(--navy); border-bottom-color: var(--navy); }
.es-glm.is-tabbed .es-glm-results [data-rtab].is-off:not(.es-glm-restab) { display: none !important; }
.es-glm.is-tabbed .es-glm-steps-card { display: block; }
.es-glm.is-tabbed .es-glm-switch { display: none; }
.es-glm .es-glm-casepick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.es-glm .es-glm-casepick-k { font-size: 13px; font-weight: 600; color: var(--muted); }
.es-glm .es-glm-casepick .es-glm-tabs { margin: 0; }
.es-glm .es-glm-arrownote { margin: 6px 0 10px; }

/* v2.6 — broken wire */
.es-glm .es-glm-bwrow { margin-top: 0.3rem; }
.es-glm .es-glm-tag.bw { background: #fdecea; color: #b3261e; border-color: #f2b8b5; }

/* v2.7 — framing (bolt holes, parts) */
.es-glm .es-glm-fmgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 0.9rem; align-items: start; }
.es-glm .es-glm-fmfig { margin: 0; position: sticky; top: calc(var(--es-glm-sticky-top, 0px) + 64px); }
.es-glm .es-glm-fmfig .es-glm-3dwrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.es-glm.is-narrow .es-glm-fmgrid, .es-glm.is-sheet .es-glm-fmgrid { grid-template-columns: minmax(0, 1fr); }
.es-glm.is-narrow .es-glm-fmfig, .es-glm.is-sheet .es-glm-fmfig { position: static; }
.es-glm .es-glm-fmonly .es-glm-sub { margin: 0.8rem 0 0.4rem; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 0.35rem; }
.es-glm .es-glm-hole, .es-glm .es-glm-part { padding-top: 0.45rem; padding-bottom: 0.45rem; }
.es-glm .es-glm-hole .es-glm-badge, .es-glm .es-glm-part .es-glm-badge { background: #e8edf6; color: var(--navy); }
.es-glm .es-glm-hole .es-glm-fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.es-glm select[data-ref] { min-width: 0; }
/* compact bolt holes: label and the two values on one line */
.es-glm .es-glm-hole { display: grid; grid-template-columns: minmax(230px, 0.8fr) minmax(0, 2fr); gap: 0.25rem 0.6rem; align-items: end; }
.es-glm .es-glm-hole .es-glm-holehead input { flex: 0 0 70px; width: 70px; }
.es-glm .es-glm-hole .es-glm-rowhead, .es-glm .es-glm-hole .es-glm-holehead { margin: 0; }
.es-glm .es-glm-hole .es-glm-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.es-glm .es-glm-part .es-glm-fields { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.es-glm.is-sheet .es-glm-hole, .es-glm.is-narrow .es-glm-hole { grid-template-columns: minmax(0, 1fr); }
/* v2.8 — parts library, assemblies, placements */
.es-glm .es-glm-libbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; padding: 0.55rem 0.7rem; margin: 0 0 0.7rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.es-glm .es-glm-libbar-t { font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.es-glm .es-glm-libbar select { flex: 1 1 220px; min-width: 0; max-width: 360px; font: inherit; font-size: 0.88rem; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.es-glm .es-glm-libbar-sp { flex: 1 1 auto; }
.es-glm .es-glm-libwho { flex-basis: 100%; margin: 0; font-size: 12px; }
.es-glm .es-glm-fmtabs { display: flex; gap: 0.35rem; margin: 0 0 0.7rem; border-bottom: 1px solid var(--line); }
.es-glm .es-glm-fmtab { font: inherit; font-size: 0.9rem; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.45rem 0.7rem; color: #3b4352; cursor: pointer; display: inline-flex; gap: 0.4rem; align-items: center; margin-bottom: -1px; }
.es-glm .es-glm-fmtab b { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #e8edf6; color: var(--navy); font-size: 0.75rem; }
.es-glm .es-glm-fmtab em { font-style: normal; font-size: 0.75rem; color: var(--muted, #5d6677); background: #f1f3f7; border-radius: 9px; padding: 0 0.4rem; }
.es-glm .es-glm-fmtab.is-on { border-bottom-color: var(--amber, #C9A21A); color: var(--navy); font-weight: 600; }
.es-glm .es-glm-fmtab.is-on b { background: var(--navy); color: #fff; }
.es-glm .es-glm-libhead, .es-glm .es-glm-asmhead, .es-glm .es-glm-placehead { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.es-glm .es-glm-libhead input, .es-glm .es-glm-asmhead input, .es-glm .es-glm-placehead input { flex: 1 1 160px; font: inherit; font-size: 0.9rem; font-weight: 600; min-width: 0; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; }
.es-glm .es-glm-lib .es-glm-badge, .es-glm .es-glm-asm .es-glm-badge, .es-glm .es-glm-place .es-glm-badge { background: #e8edf6; color: var(--navy); }
.es-glm .es-glm-asm > .es-glm-note { margin: 0 0 0.5rem; }
.es-glm .es-glm-asmitem { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr) minmax(0, 1.3fr); gap: 0.4rem 0.5rem; align-items: end; padding: 0.5rem 0; border-top: 1px dashed var(--line); }
.es-glm .es-glm-asmitem .es-glm-item-del { justify-self: end; }
.es-glm .es-glm-asmitem .es-glm-field { margin: 0; }
.es-glm .es-glm-asmitem .es-glm-item-del { margin-bottom: 0.35rem; }
.es-glm .es-glm-add-item { margin-top: 0.4rem; }
.es-glm.is-sheet .es-glm-asmitem { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.es-glm .es-glm-fmtab { white-space: nowrap; }
.es-glm.is-sheet .es-glm-fmtabs { overflow-x: auto; }
.es-glm.is-sheet .es-glm-fmtab { font-size: 0.82rem; padding: 0.4rem 0.45rem; gap: 0.3rem; }

/* v3 — framing cards */
.es-glm .es-glm-opt { font-size: 0.72rem; font-weight: 500; color: #5d6677; background: #f1f3f7; border-radius: 9px; padding: 0.1rem 0.5rem; margin-left: 0.4rem; vertical-align: middle; }
.es-glm .es-glm-pnames { margin-top: 0.5rem; border-top: 1px dashed var(--line); padding-top: 0.4rem; }
.es-glm .es-glm-pnames > summary { cursor: pointer; font-size: 0.85rem; color: var(--navy); font-weight: 500; }
.es-glm .es-glm-pnlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.35rem 0.6rem; margin-top: 0.45rem; }
.es-glm .es-glm-pnrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem; align-items: center; font-size: 0.82rem; }
.es-glm .es-glm-pnrow code { font-size: 0.75rem; color: #3b4352; background: #f1f3f7; border-radius: 4px; padding: 0.1rem 0.35rem; }
.es-glm .es-glm-pnrow input { font: inherit; font-size: 0.85rem; padding: 0.3rem 0.45rem; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.es-glm .es-glm-condonly { margin-bottom: 0.6rem; }
.es-glm.is-sheet .es-glm-hole .es-glm-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* design-guide diagrams */
.es-glm .es-glm-hfig { margin: 0.2rem 0 0.8rem; }
.es-glm .es-glm-hfig svg { display: block; width: 100%; height: auto; background: #f5f7fb; border: 1px solid #e3e8f0; border-radius: 8px; }
.es-glm .es-glm-hfig text { font-family: inherit; font-size: 10px; fill: #1d2433; }
.es-glm .es-glm-hfig .lb { font-weight: 700; font-size: 10.5px; fill: #1F3864; }
.es-glm .es-glm-hfig .sm { font-size: 9.5px; fill: #5d6677; }
.es-glm .es-glm-hfig .mo, .es-glm .es-glm-hfig .mo2 { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9.5px; fill: #3b4352; }
.es-glm .es-glm-hfig .mo2 { fill: #1F3864; font-weight: 700; }
.es-glm .es-glm-hfig .big { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; fill: #1F3864; }
.es-glm .es-glm-hfig .nm { font-weight: 700; font-size: 10px; fill: #8a6d00; }
.es-glm .es-glm-hfig .lbo { font-weight: 700; font-size: 10.5px; fill: #b5651d; }
.es-glm .es-glm-hfig .lbp { font-weight: 700; font-size: 10.5px; fill: #7a4fb5; }
.es-glm .es-glm-hfig .pl { fill: #c9d2e3; stroke: #1F3864; stroke-width: 1.1; }
.es-glm .es-glm-hfig .bx { fill: #fff; stroke: #1F3864; stroke-width: 1.2; }
.es-glm .es-glm-hfig .ho { fill: #fff; stroke: #1F3864; stroke-width: 1.4; }
.es-glm .es-glm-hfig .pt { fill: #C9A21A; stroke: #8a6d00; stroke-width: 1; }
.es-glm .es-glm-hfig .mb { stroke: #1F3864; stroke-width: 3.2; stroke-linecap: round; }
.es-glm .es-glm-hfig .in { stroke: #8a93a3; stroke-width: 4.5; stroke-linecap: round; }
.es-glm .es-glm-hfig .br { stroke: #1F3864; stroke-width: 1.6; }
.es-glm .es-glm-hfig .cd { stroke: #5d6677; stroke-width: 1.2; stroke-dasharray: 4 3; }
.es-glm .es-glm-hfig .gd { stroke: #9aa3b2; stroke-width: 1; stroke-dasharray: 3 3; }
.es-glm .es-glm-hfig .gr { stroke: #6b4f2a; stroke-width: 2; }
.es-glm .es-glm-hfig .dm { stroke: #5d6677; stroke-width: 1; }
.es-glm .es-glm-hfig .ax { stroke: #1F3864; stroke-width: 1.6; }
.es-glm .es-glm-hfig .arc { fill: none; stroke: #5d6677; stroke-width: 1; }
.es-glm .es-glm-hfig .ft { stroke: #d9822b; stroke-width: 2.6; }
.es-glm .es-glm-hfig .fv { stroke: #1F3864; stroke-width: 1.8; }
.es-glm .es-glm-hfig .fl { fill: #fff; stroke: #7a4fb5; stroke-width: 1.6; }
.es-glm .es-glm-hfig .fld { fill: #7a4fb5; }
.es-glm .es-glm-hfig .aha, .es-glm .es-glm-hfig .ahn { fill: #1F3864; }
.es-glm .es-glm-hfig .ahg { fill: #5d6677; }
.es-glm .es-glm-hfig .aho { fill: #d9822b; }

/* collapsible list items (any width; phones load them collapsed) */
.es-glm .es-glm-isum { display: none; }
.es-glm .es-glm-fold { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; margin: 0 -0.15rem 0 0; padding: 0; border: 1px solid #c9cfda; border-radius: 6px; background: #fff; color: var(--navy, #1F3864); font-size: 0.95rem; line-height: 1; cursor: pointer; }
.es-glm .es-glm-item.is-folded > :not(:first-child):not(.es-glm-isum) { display: none !important; }
.es-glm .es-glm-item.is-folded > :first-child { margin-bottom: 0.3rem; }
.es-glm .es-glm-item.is-folded { padding-bottom: 0.5rem; }
.es-glm .es-glm-item.is-folded > .es-glm-isum { display: block; width: 100%; text-align: left; font: inherit; font-size: 0.8rem; color: #5d6677; background: none; border: 0; padding: 0 0 0 2.4rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-glm .es-glm-foldall { display: inline-block; float: right; font: inherit; font-size: 0.78rem; color: var(--navy, #1F3864); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0.2rem 0; }
/* collapsible cards */
.es-glm .es-glm-card > .es-glm-h { cursor: pointer; }
.es-glm .es-glm-cardfold { margin-left: 0.25rem; width: 26px; height: 26px; padding: 0; border: 1px solid #c9cfda; border-radius: 6px; background: #fff; color: var(--navy, #1F3864); font-size: 0.9rem; line-height: 1; cursor: pointer; }
.es-glm .es-glm-card.is-collapsed > :not(.es-glm-h) { display: none !important; }
.es-glm .es-glm-card.is-collapsed { padding-bottom: 0.6rem; }
.es-glm .es-glm-card.is-collapsed > .es-glm-h { margin-bottom: 0; }
.es-glm.is-tabbed .es-glm-form > .es-glm-card.is-collapsed { min-height: 0; }
@media print { .es-glm .es-glm-fold, .es-glm .es-glm-cardfold, .es-glm .es-glm-foldall { display: none !important; } }

.es-glm .es-glm-hfig .mbt { stroke: #0f766e; stroke-width: 3.2; stroke-linecap: round; }
.es-glm .es-glm-hfig .lbt { font-weight: 700; font-size: 10.5px; fill: #0f766e; }
.es-glm .es-glm-hfig .fw { stroke: #2f6db5; stroke-width: 1.8; }
.es-glm .es-glm-hfig .ahw { fill: #2f6db5; }

/* side panel tabs: Geometry · Info · Contents */
.es-glm .es-glm-aside-head { padding: 0.4rem 0.5rem; gap: 0.4rem; }
.es-glm .es-glm-ptabs { display: flex; gap: 0.2rem; flex: 1 1 auto; min-width: 0; }
.es-glm .es-glm-ptab { flex: 1 1 0; min-width: 0; padding: 0.42rem 0.5rem; border: 1px solid transparent; border-radius: 7px; background: none; font: inherit; font-size: 0.84rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.es-glm .es-glm-ptab:hover { color: var(--navy); background: #fff; }
.es-glm .es-glm-ptab.is-on { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: 0 1px 2px rgba(15,24,42,0.06); }
.es-glm .es-glm-pane[hidden] { display: none !important; }
.es-glm .es-glm-pane-geo, .es-glm .es-glm-pane-toc { overflow-y: auto; padding: 0.6rem 0.7rem 0.9rem; font-size: 0.88rem; }
.es-glm .es-glm-panehint { margin: 0 0 0.5rem; font-size: 0.8rem; color: var(--muted); }
.es-glm .es-glm-pane-geo .es-glm-fig { position: static; }
.es-glm.is-sheet .es-glm-ptab[data-ptab="geo"], .es-glm.es-glm-portal .es-glm-ptab[data-ptab="geo"] { display: none; }
/* card 1 without its drawing (it lives in the panel): one column */
.es-glm.has-panefig .es-glm-card-fig .es-glm-cardgrid { grid-template-columns: minmax(0, 1fr); }
.es-glm .es-glm-toc { list-style: none; margin: 0; padding: 0; }
.es-glm .es-glm-tochead { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0.7rem 0 0.25rem; }
.es-glm .es-glm-tochead:first-child { margin-top: 0; }
.es-glm .es-glm-tocbtn { display: block; width: 100%; text-align: left; padding: 0.42rem 0.6rem; margin: 0 0 0.15rem; border: 1px solid transparent; border-radius: 7px; background: none; font: inherit; cursor: pointer; color: var(--ink); }
.es-glm .es-glm-tocbtn:hover { background: var(--bg); border-color: var(--line); }
.es-glm .es-glm-tocbtn.is-on { background: var(--amber-soft); border-color: #ecd58b; }
.es-glm .es-glm-toclab { display: block; font-weight: 600; font-size: 0.88rem; white-space: pre; }
.es-glm .es-glm-tocsub { display: block; font-size: 0.76rem; color: var(--muted); }
.es-glm .is-bad > .es-glm-tocbtn .es-glm-tocsub { color: var(--bad); }

/* samples manager */
.es-glm { position: relative; }
.es-glm .es-glm-smgr { position: absolute; right: 0; z-index: 60; width: min(560px, calc(100% - 16px)); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(15,24,42,0.22); padding: 0.8rem 0.9rem 0.9rem; font-size: 0.88rem; }
.es-glm .es-glm-smgr[hidden] { display: none; }
.es-glm .es-glm-smgr [hidden] { display: none !important; }
.es-glm .es-glm-smgr-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.2rem; color: var(--navy); }
.es-glm .es-glm-smgr-title { flex: 0 0 auto; white-space: nowrap; font-size: 1rem; }
.es-glm .es-glm-smgr-who { margin: 0 0 0.6rem; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
.es-glm .es-glm-smgr-close { flex: 0 0 auto; background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.es-glm .es-glm-smgr-sh { margin: 0 0 0.45rem; font-weight: 700; font-size: 0.84rem; color: var(--navy); }
.es-glm .es-glm-smgr-scope { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.es-glm .es-glm-smgr-opt { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.84rem; cursor: pointer; }
.es-glm .es-glm-smgr-opt input { margin: 0; accent-color: var(--navy); }
.es-glm .es-glm-smgr .es-glm-mfield .es-glm-smgr-opt span { display: inline; margin: 0; font-size: 0.84rem; font-weight: 400; color: var(--ink); }
.es-glm .es-glm-smgr .es-glm-smgr-opt input[type="radio"] { width: auto; flex: 0 0 auto; }
.es-glm .es-glm-smgr-hint { margin: 0.45rem 0 0; font-size: 0.76rem; line-height: 1.45; color: var(--muted); }
.es-glm .es-glm-snum { flex: 0 0 1.8rem; text-align: right; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.es-glm .es-glm-ssub { margin: 0 0 0.25rem; font-size: 0.74rem; color: var(--muted); }
.es-glm .es-glm-smgr-save { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0.6rem 0.7rem; margin-bottom: 0.7rem; }
.es-glm .es-glm-smgr .es-glm-mfield { display: block; margin-bottom: 0.45rem; }
.es-glm .es-glm-smgr .es-glm-mfield span { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 0.15rem; }
.es-glm .es-glm-smgr input[type="text"], .es-glm .es-glm-smgr select { width: 100%; box-sizing: border-box; padding: 0.42rem 0.55rem; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: #fff; }
.es-glm .es-glm-smgr-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.es-glm .es-glm-smgr-row select { flex: 1 1 180px; width: auto; }
.es-glm .es-glm-sgrp { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0.7rem 0 0.25rem; }
.es-glm .es-glm-srow { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem; border-radius: 7px; }
.es-glm .es-glm-srow:hover { background: var(--bg); }
.es-glm .es-glm-srow.is-cur { background: var(--amber-soft); }
.es-glm .es-glm-sname { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; }
.es-glm .es-glm-sname > span { font-weight: 600; }
.es-glm .es-glm-sname em { font-style: normal; font-size: 0.74rem; color: var(--muted); }
.es-glm .es-glm-sname small { flex-basis: 100%; font-size: 0.76rem; color: var(--muted); }
.es-glm .es-glm-sname .es-glm-sren { flex: 1 1 160px; }
.es-glm .es-glm-sacts { flex: 0 0 auto; display: flex; flex-wrap: nowrap; gap: 0.25rem; justify-content: flex-end; }

/* ---- full screen ---- */
html.es-glm-noscroll, html.es-glm-noscroll body { overflow: hidden !important; }
.es-glm.is-fs { position: fixed !important; inset: 0 !important; z-index: 99990; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 16px 24px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.es-glm.is-fs:fullscreen { width: 100% !important; height: 100% !important; }
.es-glm.is-fs::backdrop { background: #fff; }
.es-glm.is-fs > .es-glm-toolbar { margin-left: -16px; margin-right: -16px; border-radius: 0; }
.es-glm .es-glm-fs-btn[aria-pressed="true"] { background: var(--amber-soft); border-color: var(--amber); color: var(--navy); }
@media print { .es-glm .es-glm-fs-btn { display: none !important; } }
.es-glm .es-glm-smgr-login { margin: 0.2rem 0 0.2rem; }
.es-glm .es-glm-smgr-login a { text-decoration: none; display: inline-block; }
