/* מפת דו-שימוש: isometric example moshav farm (dualuse_scene.py). Panel,
   text list and full-screen frame reuse gridmap.css. */
.ds-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.ds-canvas { background: linear-gradient(180deg, #F3F8F5 0%, #E9F2EC 100%); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.ds-map { display: block; width: 100%; height: auto; }
.gm-canvas-full .ds-map { height: 100%; }
.ds-intro { color: var(--text-light); line-height: 1.7; margin: 0 0 0.9rem; max-width: 760px; }
.ds-home { max-width: 1140px; margin: 0 auto; }

/* scene palette — one light source (top-left): t = light, l = mid, r = dark */
.ds-canvas { background: radial-gradient(120% 90% at 50% 10%, #F4FAF6 0%, #E7F1EA 70%, #DDEBE2 100%); }
.ds-map { font-family: Heebo, 'Assistant', system-ui, sans-serif; }
.ds-slab-r { fill: #8C6A4A; } .ds-slab-l { fill: #A9825C; }
.ds-grass { fill: #CFE3BE; }
.ds-field { fill: #D9D2BC; } .ds-field2 { fill: #C3DBAE; }
.ds-moshav { fill: #E3ECD9; }
.ds-garden { fill: #BFD9A6; }
.ds-street { fill: #D6D9D2; }
.ds-road { fill: #9FA8A6; } .ds-lanes { opacity: .9; }
.ds-farm { fill: #F2E7CC; stroke: #D99A1E; stroke-width: 1.6; stroke-dasharray: 7 5; }
.ds-yard { fill: #E9DCBC; }
.ds-gravel { fill: #DCD3C2; }
.ds-tag rect { fill: #fff; filter: url(#dsPillSh); }
.ds-tag text { font-size: 13px; font-weight: 700; fill: #8A5A00; }
.ds-tag-m text { fill: #0F4C35; }
.ds-shadow { fill: #1D3B2C; opacity: .16; filter: url(#dsBlur); }
.ds-wall-t { fill: #FBF7F0; } .ds-wall-l { fill: #F1EADF; } .ds-wall-r { fill: #D9CFBF; }
.ds-win { fill: #4F6E86; opacity: .85; } .ds-win-r { opacity: .65; }
.ds-roof { fill: url(#dsRoof); } .ds-roof-b { fill: #A04B2D; }
.ds-ridge { stroke: #8E3F25; stroke-width: 1.4; }
.ds-coop-t { fill: #E8E2D6; } .ds-coop-l { fill: #CFC6B5; } .ds-coop-r { fill: #B6AC99; }
.ds-hay-t { fill: #F0D27A; } .ds-hay-l { fill: #DDB95A; } .ds-hay-r { fill: #C59F45; }
.ds-tractor-t { fill: #3E8E5A; } .ds-tractor-l { fill: #2F7548; } .ds-tractor-r { fill: #245C38; }
.ds-cab-t { fill: #E9EEF1; } .ds-cab-l { fill: #C9D3DA; } .ds-cab-r { fill: #A9B6C0; }
.ds-gh-t { fill: #F4FAFD; opacity: .85; } .ds-gh-l { fill: #DDEBF2; opacity: .85; } .ds-gh-r { fill: #C3D8E3; opacity: .85; }
.ds-pv { fill: url(#dsPv); stroke: #D6DEE6; stroke-width: 1.1; stroke-linejoin: round; }
.ds-pv-cell { stroke: #8FB0D3; stroke-width: .45; opacity: .55; }
.ds-pv-edge { fill: #0E2240; }
.ds-glint { fill: url(#dsGlint); opacity: .0; animation: ds-glint 7s ease-in-out infinite; }
.ds-fence-pv { fill: url(#dsPv); stroke: #CBD5DF; stroke-width: .7; }
.ds-fence-top { stroke: #E6ECF1; stroke-width: 1.2; }
.ds-fence-post { stroke: #5D6B76; stroke-width: 1.6; }
.ds-post { stroke: #6E7B86; stroke-width: 1.7; stroke-linecap: round; } .ds-post-b { opacity: .7; }
.ds-trunk { stroke: #7A5A3C; stroke-width: 2.4; stroke-linecap: round; }
.ds-tree { fill: #5E9E4E; } .ds-orch { fill: #6FAF52; } .ds-tree-hi { fill: #fff; opacity: .18; }
.ds-water { fill: url(#dsWater); }
.ds-shimmer { fill: #fff; opacity: .35; animation: ds-shimmer 5s ease-in-out infinite; }
.ds-bank { fill: #C9B48E; } .ds-bank-l { fill: #B39C74; } .ds-bank-r { fill: #9D8762; }
.ds-float { fill: #F3F6F8; opacity: .9; }
.ds-ramp-in { fill: #BFD7A8; }
@keyframes ds-glint { 0%, 70%, 100% { opacity: 0; } 80% { opacity: .9; } }
@keyframes ds-shimmer { 0%, 100% { opacity: .15; } 50% { opacity: .45; } }

/* hotspot pins */
.ds-pin-foot { fill: #0F3D2E; opacity: .25; }
.ds-pin-stem { stroke: #0F3D2E; stroke-width: 1.6; opacity: .55; }
.ds-pill { fill: #fff; filter: url(#dsPillSh); }
.ds-pill-t { font-size: 13px; font-weight: 600; fill: #12372A; }
.ds-badge { stroke: #fff; stroke-width: 2.5; }
.ds-badge-t { font-size: 13px; font-weight: 800; fill: #fff; }
.ds-pulse { fill: none; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: ds-pulse 2.6s ease-out infinite; }
@keyframes ds-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.1); opacity: 0; } }

/* interaction: gentle lift on hover/focus/active, others dim */
.ds-hit { cursor: pointer; outline: none; }
.ds-obj, .ds-pin { transition: transform .22s ease, opacity .22s ease, filter .22s ease; }
.ds-hit:hover .ds-obj, .ds-hit:focus-visible .ds-obj, .ds-hit.is-active .ds-obj { transform: translateY(-4px); filter: drop-shadow(0 6px 6px rgba(15,61,46,.25)); }
.ds-hit:hover .ds-pin, .ds-hit:focus-visible .ds-pin, .ds-hit.is-active .ds-pin { transform: translateY(-3px); }
.ds-hit:hover .ds-pill, .ds-hit:focus-visible .ds-pill, .ds-hit.is-active .ds-pill { stroke: var(--ds-c); stroke-width: 2; }
.ds-hit:focus-visible .ds-badge { stroke: #F2B705; stroke-width: 3.5; }
.ds-root.ds-has-active .ds-hit:not(.is-active) { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .ds-pulse, .ds-glint, .ds-shimmer { animation: none; } .ds-obj, .ds-pin { transition: none; } }

/* legend */
.ds-legend { list-style: none; margin: 0; padding: 0.5rem; display: grid; gap: 0.15rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.ds-leg-a { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 0.94rem; font-weight: 500; line-height: 1.35; transition: background .15s ease; }
.ds-leg-a:hover, .ds-leg-a:focus-visible, .ds-leg-a.is-active { background: var(--bg-alt); color: var(--primary); }
.ds-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ds-c); color: #fff; font-weight: 800; font-size: 0.8rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-c) 18%, transparent); }
/* Legend contrast (Equality audit 23.11.2026, WCAG 1.4.3): dark digits on yellow,
   darker green / blue backgrounds behind the white digits. Legend numbers only. */
.ds-num.ds-num-yellow { color: #111827; }
.ds-num.ds-num-green { background: #1C8256; box-shadow: 0 0 0 3px color-mix(in srgb, #1C8256 18%, transparent); }
.ds-num.ds-num-blue { background: #2777B6; box-shadow: 0 0 0 3px color-mix(in srgb, #2777B6 18%, transparent); }
.ds-legend { box-shadow: 0 6px 20px rgba(15,61,46,.07); }
.ds-side .gm-panel .gm-entry-title { font-size: 1.12rem; font-weight: 700; }
.ds-side .gm-panel .gm-entry-text { font-size: .95rem; color: var(--text); }
.ds-checks li::marker { color: var(--primary-light, #1F8A5B); }
.ds-checks { margin: 0 0 0.5rem; padding-inline-start: 1.2rem; line-height: 1.7; }
.ds-group-t { font-size: 1.05rem; color: var(--primary); margin: 0 0 0.5rem; }
.ds-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.ds-btn { display: inline-flex; align-items: center; padding: 0.55rem 1rem; border-radius: 10px; font-weight: 600; font-size: 0.92rem; text-decoration: none; border: 1px solid var(--primary); color: var(--primary); background: var(--card); }
.ds-btn-primary { background: var(--primary); color: #fff; }
.ds-btn:hover, .ds-btn:focus-visible { filter: brightness(1.08); }
.ds-text { margin-top: 0.8rem; }
.ds-text summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.ds-text[open] #dsList { margin-top: 0.8rem; }

/* full-screen */
.gm-full > .ds-full-body { display: flex; flex-direction: row; flex: 1 1 auto; min-height: 0; width: 100%; }
.ds-full-body .gm-canvas-full { flex: 1 1 auto; }
.ds-full-legend { flex: 0 0 260px; padding: 0.6rem; overflow: auto; background: #fff; border-inline-end: 1px solid var(--border); }
.ds-full-legend .ds-legend { border: 0; }
.gm-full .ds-canvas, .gm-canvas-full { background: linear-gradient(180deg, #F3F8F5 0%, #E9F2EC 100%); }

/* desktop: the explanation opens inside the side column, above the legend */
@media (min-width: 901px) {
    .ds-side .gm-panel { position: static; width: auto; max-height: none; inset: auto; box-shadow: var(--shadow); margin-bottom: 0.8rem; display: none; transform: none; }
    .ds-side .gm-panel.is-open { display: block; visibility: visible; opacity: 1; }
    .ds-full-legend .gm-panel { box-shadow: none; border: 1px solid var(--border); }
}
@media (max-width: 900px) {
    .ds-layout { grid-template-columns: minmax(0, 1fr); }
    .ds-legend { grid-template-columns: 1fr 1fr; }
    .ds-full-legend { flex: 0 0 0; padding: 0; border: 0; overflow: visible; }
    .ds-full-legend .ds-legend { display: none; }
}
@media (max-width: 480px) { .ds-legend { grid-template-columns: 1fr; } }

/* full-screen: the illustration caption never covers the options list or the map pins
   (Equality audit 23.11.2026, 200% zoom / WCAG 1.4.10). Wide screens: it stays over the
   map but no wider than the map area. Narrow or short (zoomed) screens: it sits in the
   page flow under the map instead of floating over it. */
@media (min-width: 901px) {
    .gm-full.ds-root .gm-fhint { max-width: calc(100% - 260px - 1.5rem); }
}
@media (max-width: 900px), (max-height: 600px) {
    .gm-full.ds-root .gm-fhint { position: static; flex: 0 0 auto; max-width: none; margin: 0; border-radius: 0; background: #0F3D2E; padding: 0.35rem 0.75rem; }
}

/* homepage: full-width scene, legend as chips below */
.ds-home .ds-layout { grid-template-columns: minmax(0, 1fr); }
.ds-home .ds-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem; align-items: start; }
.ds-home .ds-side .gm-panel { grid-column: 1 / -1; }
.ds-home .ds-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-home .ds-actions { margin-top: 0; flex-direction: column; }
@media (max-width: 900px) { .ds-home .ds-side { grid-template-columns: minmax(0, 1fr); } .ds-home .ds-legend { grid-template-columns: 1fr 1fr; } .ds-home .ds-actions { flex-direction: row; } }
@media (max-width: 480px) { .ds-home .ds-legend { grid-template-columns: 1fr; } }

/* rule blocks inside an entry: TAMA conditions (dual-use) / fire requirements (storage) */
.ds-rule { margin: 0.8rem 0 0.4rem; padding: 0.7rem 0.8rem 0.6rem; border-radius: 12px; background: #F3F7FA; border-inline-start: 3px solid #2F7FC1; }
.ds-rule-fire { background: #FBF4EE; border-inline-start-color: #C2532B; }
.ds-rule .ds-rule-t { margin: 0 0 0.3rem; color: #12372A; font-weight: 700; display: flex; align-items: center; gap: 0.35rem; }
.ds-rule-route { margin: 0 0 0.35rem; font-size: 0.86rem; font-weight: 600; color: #2B4A60; line-height: 1.5; }
.ds-rule-list { margin: 0 0 0.4rem; padding-inline-start: 1.1rem; font-size: 0.9rem; line-height: 1.55; }
.ds-rule-list li { margin-bottom: 0.2rem; }
.ds-rule-src { margin: 0; font-size: 0.78rem; color: var(--text-light); line-height: 1.5; }
.ds-rule-src a { color: var(--primary); }

/* storage scene kinds */
.ds-cont-t { fill: #F4F6F8; } .ds-cont-l { fill: #DCE2E7; } .ds-cont-r { fill: #BCC6CE; }
.ds-contg-t { fill: #E6EFE9; } .ds-contg-l { fill: #C9DCCF; } .ds-contg-r { fill: #A9C4B2; }
.ds-bat-t { fill: #FFFFFF; } .ds-bat-l { fill: #E7ECEF; } .ds-bat-r { fill: #C8D1D8; }
.ds-tr-t { fill: #A3ADB4; } .ds-tr-l { fill: #8A949B; } .ds-tr-r { fill: #6F7980; }
.ds-fact-t { fill: #EEF0F2; } .ds-fact-l { fill: #D7DCE0; } .ds-fact-r { fill: #B9C0C6; }
.ds-fact-s { fill: #C9D2D9; }
.ds-room-t { fill: #E9E2D4; } .ds-room-l { fill: #D6CCBA; } .ds-room-r { fill: #BDB29E; }
.ds-car-t { fill: #3D6E9E; } .ds-car-l { fill: #2F5A84; } .ds-car-r { fill: #24476A; }
.ds-car2-t { fill: #E6E8EA; } .ds-car2-l { fill: #C9CDD1; } .ds-car2-r { fill: #A9AFB5; }
.ds-car3-t { fill: #B8463A; } .ds-car3-l { fill: #9A392F; } .ds-car3-r { fill: #7E2E26; }
.ds-chg-t { fill: #1F8A5B; } .ds-chg-l { fill: #187049; } .ds-chg-r { fill: #125638; }
.ds-rib { stroke: #AAB5BE; stroke-width: .8; }
.ds-hvac { fill: #8E9AA4; }
.ds-warn { fill: #E8A317; }
.ds-door { fill: #6F5E48; }
.ds-led { fill: #33C27A; }
.ds-mesh { fill: none; stroke: #8C979F; stroke-width: .8; stroke-dasharray: 2 2; }
.ds-yard2 { fill: #CFCABF; }
.ds-park { fill: #B5BBBA; }
.ds-bay { stroke: #fff; stroke-width: 1.2; opacity: .8; }
.ds-steel { stroke: #6E7B86; stroke-width: 1.6; }
.ds-bush { stroke: #C9A15A; stroke-width: 2.4; stroke-linecap: round; }
.ds-pole { stroke: #7A6A55; stroke-width: 2; }
.ds-wire { fill: none; stroke: #4B5560; stroke-width: .8; opacity: .7; }

/* storage: fire-and-rescue details section */
.st-fire { margin-top: 2rem; }
.st-lead { color: var(--text-light); line-height: 1.7; max-width: 820px; }
.st-h3 { font-size: 1.05rem; font-weight: 700; margin: 1.2rem 0 0.5rem; color: #12372A; }
.st-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.st-table th, .st-table td { padding: 0.6rem 0.75rem; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.st-table thead th { background: #F3F7FA; font-weight: 700; }
.st-table tbody th { font-weight: 700; white-space: nowrap; }
.st-table tbody tr:last-child > * { border-bottom: 0; }
.st-note { font-size: 0.85rem; color: var(--text-light); margin: 0.5rem 0 0; }
.st-common { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.7rem; margin: 0; }
.st-common > div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.85rem; }
.st-common dt { font-weight: 700; margin-bottom: 0.25rem; color: #8A3A1C; }
.st-common dd { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.st-src { font-size: 0.88rem; line-height: 1.7; }
.st-home-promo { margin: 0 auto 2rem; }
/* full-screen skip link to the options list: only when the list is on screen */
@media (max-width: 900px) { .ds-skip-options { display: none; } }
