/* The DEQ Toolkit page (src/deq/deq-twin.js). Cards, tables, pills, tabs, pagers and the pop-up are the shared .wqx-* classes in
   wq-twin.css; only what this page adds is here. Colour comes from tokens only; no gradients, no blur, no coloured edge
   stripes, no keyframes (styles/motion.css owns those). */

.dq { display: grid; gap: 18px; }
.dq-trust { margin: 0 0 10px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); max-width: 62em; }
.dq-lede { margin: 0 0 10px; font-size: var(--guide-fs-md); line-height: 1.5; max-width: 62em; }

/* "Do I need a permit?" cards */
.dq-needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dq-need { width: 100%; height: 100%; display: grid; gap: 4px; align-content: start; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--guide-color-border-default); background: var(--guide-color-paper); color: var(--guide-color-ink); cursor: pointer; font: inherit; }
.dq-need b { font-size: var(--guide-fs-md); line-height: 1.3; }
.dq-need span { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.dq-need-go { font-style: normal; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: var(--guide-fs-sm); font-weight: 600; color: var(--guide-color-link); }
.dq-need-go svg { width: 14px; height: 14px; }
.dq-need:hover { border-color: var(--guide-color-border-strong); background: var(--guide-color-bg-1); }
.dq-need:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 2px; }

/* the memo sentence */
.dq-big { max-width: 48em; font-size: clamp(18px, 3.2vw, 24px); }
.dq-srcs { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: var(--guide-fs-sm); }
.dq-status { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }

/* lines, steps, facts */
.dq-lines { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: var(--guide-fs-sm); line-height: 1.45; }
.dq-lines li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.dq-lines svg { width: 14px; height: 14px; flex: none; align-self: center; color: var(--guide-color-ink-muted); }
.dq-lines small, .dq-facts small, .dq-rec-sub small, .dq-table small { color: var(--guide-color-ink-muted); font-size: var(--guide-fs-xs); }
.dq-steps { margin: 10px 0; padding-left: 22px; display: grid; gap: 8px; font-size: var(--guide-fs-md); line-height: 1.5; }
.dq-facts { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: var(--guide-fs-sm); line-height: 1.5; max-width: 62em; }
.dq-lawlist { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 6px; font-size: var(--guide-fs-sm); }

/* by kind: a bar per type, split by standing */
.dq-types { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 8px; }
.dq-typerow { display: grid; grid-template-columns: minmax(150px, 17em) minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; font-size: var(--guide-fs-sm); }
.dq-typename { line-height: 1.3; }
.dq-typetrack { display: block; height: 14px; }
.dq-typebar { display: flex; gap: 2px; height: 14px; }
.dq-seg { display: block; min-width: 2px; border-radius: 3px; }
.dq-typen { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3em; text-align: right; }
.dq-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--guide-color-border-strong); font-style: normal; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); white-space: nowrap; }
@media (max-width: 640px) { .dq-typerow { grid-template-columns: minmax(0, 1fr) auto; } .dq-typetrack { grid-column: 1 / -1; grid-row: 2; } }

/* standing pill: the colour is a dot, the words carry the meaning */
.dq-pill { display: inline-flex; align-items: center; gap: 6px; }
.dq-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--dq-c); flex: none; }

/* the map */
.dq-mapwrap { max-width: 920px; }
.dq-map { width: 100%; height: auto; display: block; }
.dq-co { fill: var(--guide-color-bg-1); stroke: var(--guide-color-border-strong); stroke-width: 0.8; cursor: pointer; }
.dq-co.is-sel { fill: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); stroke: var(--guide-color-ink); stroke-width: 1.8; }
.dq-co:hover { stroke: var(--guide-color-ink); }
.dq-dot { stroke: var(--guide-color-paper); stroke-width: 0.6; cursor: pointer; }
.dq-dot:hover { stroke: var(--guide-color-ink); stroke-width: 1.4; }

/* one permit */
.dq-record { scroll-margin-top: 80px; border-color: var(--guide-color-border-strong); }
.dq-rec-sub { margin: 0 0 6px; font-size: var(--guide-fs-md); color: var(--guide-color-ink-soft); }
.dq-rec-type { margin: 0 0 8px; font-size: var(--guide-fs-md); line-height: 1.5; max-width: 62em; }
.dq-rec-pills { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: var(--guide-fs-sm); }
.dq-rec-say { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--guide-color-bg-1); font-size: var(--guide-fs-md); line-height: 1.5; max-width: 62em; }
.dq-strip { width: 100%; height: auto; display: block; margin: 8px 0; }
.dq-mk { stroke: var(--guide-color-paper); stroke-width: 2; }

/* tables */
.dq-table th small, .dq-table td small { display: block; }
.dq-table td, .dq-table th { vertical-align: top; }
.dq-filters { margin-bottom: 10px; }

@media (max-width: 640px) {
  .dq-needs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dq-need { padding: 10px 12px; }
  .dq-need-go { display: none; }
}

/* the printed sheet: the finder, tabs, buttons and pop-up are left off; every card is kept whole */
@media print {
  .dq-finder, .dq-needs, .dq .wqx-actions, .dq .wqx-tabs, .dq .wqx-pager { display: none !important; }
  .dq { gap: 10px; }
  .dq-record, .dq-rec-say { break-inside: avoid; }
  .dq-map { max-height: 260px; }
}

/* the nine older calculators, collapsed under the page */
.deq-old { margin: 18px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--guide-color-border-default); background: var(--guide-color-paper); }
.deq-old > summary { cursor: pointer; font-size: var(--guide-fs-sm); font-weight: 600; color: var(--guide-color-ink-soft); }
.deq-old[open] > summary { margin-bottom: 10px; }
@media print { .deq-old { display: none !important; } }

/* search results: a name over a line of detail (the shared .wqx-results button is a three-column grid for a dot, a name and a tag) */
.dq .wqx-results .wqx-hit { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.dq .wqx-results .wqx-hit span { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); overflow-wrap: anywhere; }
