/* IP explorer: floorplan navigator, filter chips, card grid, detail drawer */
.ipx-sec { padding-top: clamp(48px, 7vw, 88px); }
.ipx-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; }
.ipx-head > div { min-width: 0; flex: 1 1 520px; }
.floor-short { aspect-ratio: 3 / 1; }
@media (max-width: 700px) { .floor-short { aspect-ratio: 1 / 1; } }
.ipx-panel { margin-top: 24px; border: 1px solid var(--rule); background: var(--graphite-2); padding: 18px 18px 8px; display: grid; gap: 4px; }
.ipx-catinfo { padding-bottom: 12px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.ipx-catinfo h3 { font-family: var(--display); font-stretch: 85%; font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; margin: 0 0 6px; }
.ipx-catinfo p { margin: 0; color: var(--muted); max-width: 90ch; font-size: 15px; }
.frow { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; align-items: start; padding: 6px 0; }
.frow.ftools { grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; padding: 10px 0; }
@media (max-width: 760px) { .frow { grid-template-columns: minmax(0, 1fr); } .frow.ftools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .frow.ftools input { grid-column: 1 / -1; } }
.flabel { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 7px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fchip { all: unset; cursor: pointer; font-size: 13px; padding: 5px 10px; border: 1px solid var(--rule); color: #c3ccd6; background: var(--graphite); white-space: nowrap; }
.fchip span { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 4px; }
.fchip:hover { border-color: var(--muted); color: var(--text); }
.fchip[aria-pressed="true"] { border-color: var(--copper); background: color-mix(in srgb, var(--copper) 16%, var(--graphite)); color: var(--text); }
.fchip[aria-pressed="true"] span { color: var(--copper-hi); }
.fchip:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; }
.ftools input, .ftools select { font: inherit; font-size: 14.5px; background: var(--graphite); color: var(--text); border: 1px solid var(--rule); padding: 9px 12px; min-width: 0; border-radius: 0; }
.ftools input:focus-visible, .ftools select:focus-visible { outline: 2px solid var(--copper); outline-offset: 0; }

.ipx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 8px; }
.ipc { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 12px; background: var(--graphite-2); border: 1px solid var(--rule); border-top: 3px solid var(--cc); position: relative; transition: transform .15s, border-color .15s, background-color .15s; min-width: 0; }
.ipc:hover { transform: translateY(-2px); border-color: var(--muted); border-top-color: var(--cc); background: var(--graphite-3); }
.ipc:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ipc { transition: none; } .ipc:hover { transform: none; } }
.ipc-top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; }
.ipc-tier { display: inline-flex; align-items: center; gap: 6px; color: var(--tc); }
.ipc-tier::before { content: ""; width: 8px; height: 8px; background: var(--tc); }
.ipc-tg { color: var(--muted); }
.ipc-tg.t3 { color: var(--poly); }
.ipc-id { font-family: var(--mono); font-size: 12.5px; color: var(--copper-hi); overflow-wrap: anywhere; margin-top: 4px; }
.ipc-t { font-family: var(--display); font-stretch: 90%; font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--text); }
.ipc-f { font-size: 12.5px; color: var(--muted); }
.ipc-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); border-top: 1px solid var(--rule); }
.diffb { display: inline-flex; gap: 2px; align-items: flex-end; }
.diffb i { width: 5px; height: 10px; background: var(--rule); }
.diffb i:nth-child(1) { height: 5px; } .diffb i:nth-child(2) { height: 7px; } .diffb i:nth-child(3) { height: 9px; } .diffb i:nth-child(4) { height: 11px; }
.diffb i.on { background: var(--copper); }

/* drawer */
.ipx-drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(720px, 100%); max-width: 100%; border: 0; border-left: 1px solid var(--rule); padding: 0; background: var(--graphite); color: var(--text); display: none; flex-direction: column; }
.ipx-drawer[open] { display: flex; }
.ipx-drawer::backdrop { background: rgba(5, 7, 10, 0.66); backdrop-filter: blur(2px); }
@media (prefers-reduced-motion: no-preference) { .ipx-drawer[open] { animation: slidein .22s ease-out; } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ipx-dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: calc(env(safe-area-inset-top, 0px) + 18px) 22px 16px; border-bottom: 1px solid var(--rule); background: var(--graphite-2); }
.ipx-dhead h2 { font-family: var(--display); font-stretch: 80%; font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3vw, 32px); line-height: 1; margin: 0; text-wrap: balance; }
.ipx-did { font-family: var(--mono); font-size: 13px; color: var(--copper-hi); margin: 0 0 8px; }
.ipx-dnav { display: flex; align-items: center; gap: 6px; flex: none; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dbtn { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--rule); font-size: 18px; color: var(--text); }
.dbtn:hover { border-color: var(--muted); }
.dbtn:disabled { opacity: .35; cursor: default; }
.dbtn:focus-visible { outline: 2px solid var(--copper); }
.ipx-body { overflow-y: auto; padding: 20px 22px calc(env(safe-area-inset-bottom, 0px) + 32px); flex: 1; }
.ipx-loading { color: var(--muted); }
.dsym { border: 1px solid var(--rule); background: repeating-linear-gradient(0deg, transparent 0 15px, rgba(143, 155, 170, 0.06) 15px 16px), repeating-linear-gradient(90deg, transparent 0 15px, rgba(143, 155, 170, 0.06) 15px 16px), var(--graphite-2); padding: 10px; overflow-x: auto; }
.sym { width: 100%; min-width: 460px; height: auto; display: block; }
.sym .pn { font-family: var(--mono); font-size: 12px; fill: var(--text); }
.sym .pw { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.sym .pk { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.sym .pid { font-family: var(--mono); font-size: 12px; fill: var(--text); font-weight: 500; }
.dlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.dlegend span::before { content: ""; display: inline-block; width: 14px; height: 3px; background: var(--k); margin-right: 6px; vertical-align: 3px; }
.ddesc { font-size: 16.5px; color: #c3ccd6; margin: 18px 0 14px; }
.dladder { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; font-family: var(--mono); font-size: 10px; }
.dladder span { padding: 14px 2px 4px; text-align: center; color: var(--muted); border-top: 4px solid var(--rule); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dladder .past { border-top-color: color-mix(in srgb, var(--diff) 55%, var(--rule)); }
.dladder .cur { border-top-color: var(--copper); color: var(--text); }
@media (max-width: 520px) { .dladder span { font-size: 0; padding-top: 8px; } .dladder .cur { font-size: 10px; } }
.dnote { border-left: 3px solid var(--tc); background: var(--graphite-2); padding: 9px 12px; color: #c3ccd6; font-size: 14px; margin: 12px 0 0; }
.dfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 18px 0 0; }
.dfacts div { background: var(--graphite); padding: 9px 12px; }
.dfacts .wide { grid-column: 1 / -1; }
.dfacts dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dfacts dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.dfacts code { font-family: var(--mono); font-size: 13px; }
.ipx-body h4 { font-family: var(--display); font-stretch: 125%; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchips span { font-size: 12.5px; border: 1px solid var(--rule); padding: 3px 9px; color: #c3ccd6; }
.dmuted { color: var(--muted); margin: 0; font-size: 14px; }
.dlinks { margin: 0; padding-left: 18px; font-size: 14px; }
.dlinks a { color: var(--copper-hi); }
.dlinks span { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.dcmd { display: flex; gap: 8px; align-items: stretch; }
.dcmd code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; background: var(--graphite-2); border: 1px solid var(--rule); padding: 10px 12px; overflow-x: auto; white-space: nowrap; }
.dcmd .btn { padding: 10px 14px; }
.dfull { margin-top: 24px; width: 100%; justify-content: center; box-sizing: border-box; }
