/* The Enforcement overview (src/enforce/enforce-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 new keyframes. */

/* The page is landing content: it is not shown while a sub-page of the hub is open. */
#cat-enforce:has(.hydro-sub:not([hidden])) #enforce-twin { display: none; }

/* The hub's four launcher cards repeat the tab strip above the page, and they pushed the search below the first screen. The tools stay one click away in the tabs and in the fold at the bottom. */
/* tu-atlas.css forces every hub card grid to display:grid !important unless it is [hidden], so hiding needs the same weight. */
#cat-enforce .hub-hero-panel #enforce-cards.hydro-card-grid { display: none !important; }

.entw-tools { margin: 24px 0 0; }
.entw-tools > summary { cursor: pointer; padding: 12px 16px; border: 1px solid var(--guide-color-border-strong); border-radius: 12px; background: var(--guide-color-paper); font-size: var(--guide-fs-md); font-weight: 600; }
.entw-tools[open] > summary { margin-bottom: 14px; }

.entw-rule { margin: 10px 0 0; max-width: 62em; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); }
.entw-sentences { margin: 14px 0 0; display: grid; gap: 10px; max-width: 62em; }
.entw-sentences p { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.55; }
.entw-h4 { margin: 18px 0 8px; font-size: var(--guide-fs-sm); font-weight: 600; color: var(--guide-color-ink-soft); }
.wqx-card-head + .entw-h4 { margin-top: 0; }
.entw-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.entw-table small, .entw-dl small { display: block; margin-top: 2px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); white-space: normal; }
.entw .wqx-table tr.is-on td { background: var(--guide-color-bg-2); }
.entw .wqx-table .wqx-link { text-align: left; }
.entw-fig { font-size: var(--guide-fs-md); font-variant-numeric: tabular-nums; }

/* "what do you need" buttons under the search: four plain doors */
.entw-start { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.entw-startbtn { width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-paper); color: var(--guide-color-ink); font: inherit; cursor: pointer; }
.entw-startbtn:hover, .entw-startbtn:focus-visible { background: var(--guide-color-bg-2); }
.entw-startbtn svg, .entw-startbtn i { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--guide-color-lake); }
.entw-startbtn b { display: block; font-size: var(--guide-fs-md); line-height: 1.3; }
.entw-startbtn small { display: block; margin-top: 2px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }

/* a status or a class always travels as swatch plus words; shape repeats colour */
.entw-chip { display: inline-flex; align-items: center; gap: 7px; font-size: var(--guide-fs-sm); }
.entw-chip.is-none { color: var(--guide-color-ink-muted); }
.entw-key { display: inline-block; width: 11px; height: 11px; flex: none; }
.entw-key--permit { background: var(--guide-color-brick); border-radius: 50%; }
.entw-key--snc { background: var(--guide-color-brick); border-radius: 50%; box-shadow: 0 0 0 2px var(--guide-color-paper), 0 0 0 3.5px var(--guide-color-brick); margin: 0 2px; }
.entw-key--dam { background: var(--guide-color-lake); transform: rotate(45deg) scale(.82); border-radius: 1px; }
.entw-key--fed { background: var(--guide-color-paper); border: 1.5px solid var(--guide-color-lake); transform: rotate(45deg) scale(.82); border-radius: 1px; }
.entw-key--none { background: var(--guide-color-paper); border: 1.5px solid var(--guide-color-ink-muted); border-radius: 50%; }
.entw-kind { background: var(--guide-color-lake); }
.wqx-legend .entw-key--permit, .wqx-legend .entw-key--snc, .wqx-legend .entw-key--none { border-radius: 50%; }
.wqx-legend .entw-key--dam, .wqx-legend .entw-key--fed { border-radius: 1px; }

/* map marks: a surface ring keeps overlapping marks apart */
.entw-permit { fill: var(--guide-color-brick); stroke: var(--guide-color-paper); stroke-width: 1.5; cursor: pointer; }
.entw-permit.is-snc { stroke: var(--guide-color-brick); stroke-width: 1.6; fill: color-mix(in srgb, var(--guide-color-brick) 70%, var(--guide-color-paper)); paint-order: stroke; }
.entw-dam { fill: var(--guide-color-lake); stroke: var(--guide-color-paper); stroke-width: 1.5; cursor: pointer; }
.entw-dam.is-fed { fill: var(--guide-color-paper); stroke: var(--guide-color-lake); stroke-width: 1.6; }
.entw-permit.is-on, .entw-dam.is-on { stroke: var(--guide-color-ink); stroke-width: 2.6; }
.entw-permit:focus-visible, .entw-dam:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 2px; }

/* list controls */
.entw-ctl { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 12px; align-items: flex-end; }
.entw-sort { display: grid; gap: 4px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.entw-sort select, .entw-sort input { min-height: 40px; max-width: 100%; padding: 0 10px; border-radius: 8px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-paper); color: var(--guide-color-ink); font: inherit; font-size: var(--guide-fs-sm); }
.wqx-card-head .entw-sort { grid-auto-flow: column; align-items: center; gap: 8px; }

/* one record */
.entw-record { scroll-margin-top: 80px; }
.entw-verdict { margin: 10px 0 14px; font-size: var(--guide-fs-md); line-height: 1.5; }
.entw-dl { display: grid; gap: 0; margin: 0 0 14px; border-top: 1px solid var(--guide-color-border-subtle); }
.entw-dl > div { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--guide-color-border-subtle); }
.entw-dl dt { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.entw-dl dd { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.5; }

/* what you can do */
.entw-lede { margin: 0 0 12px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); max-width: 62em; }
.entw-triage { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.entw-triage details { border: 1px solid var(--guide-color-border-strong); border-radius: 10px; padding: 10px 14px; background: var(--guide-color-paper); }
.entw-triage summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-size: var(--guide-fs-sm); line-height: 1.45; }
.entw-triage summary span { color: var(--guide-color-ink-soft); }
.entw-triage details p { margin: 8px 0 0; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }
.entw-steps, .entw-caveats, .entw-contacts { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }
.entw-caveats { margin-top: 14px; }
.entw-contacts { padding-left: 18px; gap: 12px; }
.entw .wqx-details { margin-top: 12px; font-size: var(--guide-fs-sm); }
.entw .wqx-details ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }

@media (max-width: 640px) {
  /* a table row becomes a stacked block: the name first, then each figure under its column's name */
  .entw-table, .entw-table tbody, .entw-table tr, .entw-table td { display: block; width: 100%; }
  .entw-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .entw-table tr { padding: 12px 0; border-bottom: 1px solid var(--guide-color-border-subtle); }
  .entw-table td { padding: 3px 0; border: 0; white-space: normal; }
  .entw-table td[data-label]::before { content: attr(data-label) ': '; color: var(--guide-color-ink-muted); font-size: var(--guide-fs-sm); }
  .entw-table td.entw-num { white-space: normal; }
  .entw-table td small { display: inline; margin-left: 6px; }
  .entw-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .entw-ctl { display: grid; grid-template-columns: 1fr; }
  .entw-sort select, .entw-sort input { width: 100%; }
  .wqx-card-head .entw-sort { grid-auto-flow: row; }
}

@media print {
  .entw-start, .entw .wqx-pager, .entw .wqx-seg-ctl, .entw .entw-ctl, .entw .wqx-tabs { display: none !important; }
  .entw-triage details { break-inside: avoid; }
  .entw-triage details > * { display: block; }
}
