@media (max-width: 720px) {
  .scan {
    --id-min: 0px;
    --hash-min: 0px;
    font-size: 11px;
  }

  .scan .scan-main {
    padding: 12px;
  }

  .scan
    :is(
      .scan-box,
      .scan-cells,
      .record-stats,
      .record-tabs,
      .record-id,
      .program-artifact
    ) {
    margin-bottom: 12px;
  }

  .scan .record-read {
    padding: 6px 0 10px;
  }

  .scan .record-toolbar {
    margin-bottom: 10px;
  }

  .scan .record-raw {
    margin: 10px 0;
  }

  .scan .scan-search {
    margin-bottom: 12px;
  }

  .scan header .scan-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    text-align: center;
  }

  .scan header .scan-nav a {
    display: grid;
    align-items: center;
    min-height: 36px;
    font-size: 11px;
  }

  .scan :is(.scan-cells, .record-stats, .net-metrics) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid #d0d7e2;
    background: #d0d7e2;
    overflow: hidden;
  }

  .scan :is(.scan-cells, .record-stats, .net-metrics) > :is(div, article) {
    grid-column: auto;
    align-content: start;
    gap: 6px;
    min-height: 80px;
    padding: 10px;
    border: 0;
    background: #e5e9ef;
  }

  .scan :is(.scan-cells, .record-stats, .net-metrics) > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .scan :is(.scan-cells, .record-stats, .net-metrics) strong {
    font-size: 14px;
    line-height: 1.3;
  }

  .scan :is(.scan-title, .record-title) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .scan .record-actions {
    display: flex;
    gap: 8px;
  }

  .scan .record-actions:empty {
    display: none;
  }

  .scan .record-actions > * {
    flex: 1;
    min-width: 0;
    text-align: center;
  }

  .scan button {
    min-height: 36px;
    font-size: 11px;
  }

  .scan :is(input, select, textarea) {
    min-height: 32px;
    font-size: 11px;
  }

  .scan :is(.scan-title, .record-title, .net-heading) h1 {
    font-size: 16px;
  }

  .scan :is(.scan-bar, .net-bar) h2 {
    font-size: 11px;
  }

  .scan :is(.scan-cells, .record-stats, .net-metrics) :is(span, small) {
    font-size: 10px;
  }

  .scan :is(.net-head strong, .net-bond) {
    font-size: 14px;
  }

  .scan .authority-metrics .value {
    font-size: 14px;
  }

  .scan :is(.record-id, .record-facts, .record-code) {
    font-size: 11px;
  }

  .scan :is(.record-toolbar, .program-filters, .net-filters) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .scan :is(.record-toolbar, .program-filters, .net-filters) label {
    width: 100%;
    min-width: 0;
  }

  .scan .record-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 0;
  }

  .scan .record-tabs:has(> :nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scan .record-tabs:has(> :nth-child(4)) > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .scan .record-tabs button {
    min-width: 0;
    padding: 10px 8px;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .scan :is(.scan-bar, .net-bar) {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .scan :is(.scan-bar, .net-bar) > a {
    margin-left: auto;
  }

  .scan :is(.record-pager, .program-pager, .net-pagination) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    text-align: center;
  }

  .scan :is(.record-pager, .program-pager, .net-pagination) > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .scan .record-id {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
  }

  .scan :is(.net-section, .net-directory) {
    margin: 12px;
  }

  .scan .net-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .scan .net-heading h1 {
    max-width: none;
  }

  .scan .net-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }

  .scan .net-head > :last-child {
    grid-column: 1 / -1;
  }

  .scan .geo-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .scan .geo-strip button {
    padding: 6px;
  }

  .scan .net-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .scan .net-actions button {
    border: 1px solid var(--line);
  }

  .scan :is(.scan-scroll, .net-table-wrap) {
    overflow: visible;
  }

  .scan table:not(.disasm-table),
  .scan table:not(.disasm-table) tbody,
  .scan table:not(.disasm-table) tr {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .scan table:not(.disasm-table) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .scan table:not(.disasm-table) tbody tr {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .scan table:not(.disasm-table) tbody tr + tr {
    border-top: 4px solid var(--panel-tint);
  }

  .scan
    table:not(.disasm-table)
    tbody
    tr:is(:hover, :focus-within, :active, .selected)
    td {
    background: var(--panel-tint);
    border-bottom-color: var(--line-dark);
  }

  .scan table:not(.disasm-table) td {
    display: grid;
    grid-template-columns: minmax(76px, 28%) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    border-bottom: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: right;
  }

  .scan table:not(.disasm-table) td:first-child {
    background: var(--hover);
    color: var(--blue);
    font-weight: bold;
  }

  .scan table:not(.disasm-table) td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: normal;
    text-align: left;
  }

  .scan table:not(.disasm-table) td > * {
    min-width: 0;
    max-width: 100%;
  }

  .scan table:not(.disasm-table) .scan-id-cell > * {
    width: 100%;
    text-align: right;
  }

  .scan table:not(.disasm-table) .scan-id {
    text-align: right;
  }

  .scan table:not(.disasm-table) td > a,
  .scan table:not(.disasm-table) td > button {
    justify-content: end;
    text-align: right;
  }

  .scan table:not(.disasm-table) td > .record-text-action {
    justify-self: end;
    width: auto;
    min-height: 28px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--blue);
    text-decoration: underline solid var(--line);
    text-underline-offset: 3px;
  }

  .scan table:not(.disasm-table) td > .record-text-action:is(:hover, :focus-visible) {
    text-decoration-style: dashed;
    text-decoration-color: var(--blue);
  }

  .scan table:not(.disasm-table) td[colspan] {
    display: block;
    text-align: left;
  }

  .scan table:not(.disasm-table) td[colspan]::before {
    display: none;
  }

  .scan table .record-code {
    max-height: none;
    overflow: visible;
  }

  .scan .program-artifact .disasm-table {
    table-layout: fixed;
    width: 100%;
  }

  .scan .program-artifact .disasm-table th:nth-child(2) {
    width: 88px;
  }

  .scan .program-artifact .disasm-table td {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .scan .program-artifact .source-code {
    font-size: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .scan .record-facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .scan .scan-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}
