/* Phone layout. Desktop remains governed by style.css/readability.css. */
@media (max-width: 640px) {
  :root {
    --panel: #fff; --panel2: #fbfbfb; --bg2: #f6f6f6;
    --line: #eaeaea; --mut: #606060; --dim: #8b8b8b;
    --acc2: #1890ff;
  }
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  .topbar, main, .footer { min-width: 0; max-width: 100%; }
  .topbar { padding: 8px 12px; column-gap: 8px; row-gap: 7px; }
  .brand { flex: 0 1 auto; min-width: 0; gap: 6px; }
  .brand-logo { width: 24px; height: 24px; }
  .brand-name { font-size: 16px; }
  .brand-tag { display: none; }
  .conn { order: 2; margin-left: auto; font-size: 0; gap: 0; }
  .conn i { width: 9px; height: 9px; }
  .mobile-nav-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; color: var(--txt); background: var(--panel);
    border: 1px solid var(--line); border-radius: 9px; font-size: 22px; cursor: pointer; }
  .mobile-nav-toggle[aria-expanded="true"] { background: var(--panel2); color: var(--acc2); }
  .topnav {
    display: none; position: absolute; order: 5; top: 100%; left: 0; right: 0;
    width: 100%; max-height: min(72vh, 480px); overflow-y: auto; overflow-x: hidden;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0;
    padding: 10px 12px 12px; background: var(--bg2); border-bottom: 1px solid var(--line);
    box-shadow: 0 15px 30px #0003; white-space: normal;
  }
  .topnav.mobile-open { display: grid; }
  .topnav a {
    display: flex; align-items: center; min-width: 0; min-height: 40px;
    padding: 8px 10px; font-size: 13px; text-align: left;
    white-space: normal; overflow-wrap: anywhere;
  }
  .search { order: 4; min-width: 0; gap: 6px; }
  .search input { min-width: 0; width: 0; min-height: 40px; padding: 7px 10px; font-size: 16px; }
  .search button { min-height: 40px; width: 42px; padding: 0; font-size: 0; }
  .search button::before { content: "⌕"; font-size: 26px; line-height: 1; }
  main { padding: 10px 10px 26px; }
  h1.page { font-size: 21px; line-height: 1.25; margin: 7px 0 9px; }
  .crumbs { margin-bottom: 5px; }
  details.upgrade-note { margin: 7px 10px 0; font-size: 11px; }
  .upgrade-note summary { padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .upgrade-note summary span { display: inline; margin: 0 0 0 6px; font-size: 10px; }
  .upgrade-note[open] summary { white-space: normal; }
  .overview { padding: 10px; margin: 0 0 14px; border-radius: 11px; }
  .ov-title { font-size: 16px; }
  .ov-sec { margin: 9px 2px 5px; font-size: 10px; }
  .ovgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .ovbox { padding: 7px 8px; border-radius: 7px; }
  .ovbox .k { font-size: 10px; line-height: 1.2; }
  .ovbox .v { font-size: 16px; line-height: 1.2; margin-top: 2px; }
  .ovbox .s { font-size: 10px; line-height: 1.2; margin-top: 1px; min-height: 0; }
  .overview.mobile-home-overview:not(.mobile-stats-expanded) #ovGrid > :nth-child(n+3) { display: none; }
  .mobile-overview-toggle { display: block; width: 100%; min-height: 34px; margin-top: 6px;
    background: transparent; border: 1px solid var(--line); border-radius: 7px;
    color: var(--acc2); font-size: 12px; cursor: pointer; }
  h2.sec { font-size: 16px; margin: 15px 0 6px; }
  h2.sec > span.dim { display: none; }
  .sec-row { gap: 5px; flex-wrap: nowrap; }
  .sec-row .sec { margin-bottom: 6px; min-width: 0; }
  .sec-more { font-size: 11px; }
  #blkFilters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  #blkFilters button { min-width: 0; min-height: 36px; padding: 4px 2px; font-size: 11px; line-height: 1.15; white-space: normal; }
  main > *, .note, .sec-row, .overview, .cards, .card { min-width: 0; max-width: 100%; }
  .note, .card, .kv .val { overflow-wrap: anywhere; }
  /* Compact all non-feed cards without shrinking their content to unreadable type. */
  main .cards { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main .card { padding: 9px 10px; border-radius: 9px; line-height: 1.35; }
  main .card .k { margin-bottom: 3px; font-size: 10px; }
  main .card .v { font-size: 17px; line-height: 1.3; }
  main .card .v.sm { font-size: 13px; }
  main .card .sub { font-size: 11px; line-height: 1.35; margin-top: 2px; }
  main .card.off { opacity: 1; border-style: dashed; }
  main .note { padding: 8px 10px; margin: 9px 0; font-size: 12px; line-height: 1.4; }
  main .kv .row { grid-template-columns: minmax(80px, 34%) minmax(0, 1fr); gap: 7px;
    padding: 7px 9px; }
  main .kv .key { font-size: 10px; line-height: 1.3; }
  main .kv .val { font-size: 12px; line-height: 1.35; }
  main .txbox { padding: 9px 10px; }
  .pill { font-size: 10px; padding: 2px 6px; line-height: 1.3; }
  #view[data-mobile-route="registry"] > .cards,
  #llmClasses { grid-template-columns: minmax(0, 1fr); }
  #view[data-mobile-route="registry"] > .cards .card > b { font-size: 14px !important; }
  #view[data-mobile-route="registry"] > .cards .card > span:nth-child(2) {
    display: -webkit-box !important; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; overflow: hidden; margin: 2px 0 5px !important;
  }
  #view[data-mobile-route="registry"] > .cards .card > span { font-size: 12px; line-height: 1.3; }
  #llmClasses .card .v.sm { font-size: 13px; }
  #llmClasses .card .sub.mono { font-size: 10px; }

  /* The ratios stay visible; detailed arithmetic and prose are available on demand. */
  #llmWeight .wbar-wrap { padding: 10px; margin-bottom: 8px; }
  #llmWeight .wbar-head { gap: 2px; margin-bottom: 6px; }
  #llmWeight .wbar-title { font-size: 10px; }
  #llmWeight .wbar-big { font-size: 14px; line-height: 1.3; }
  #llmWeight .wbar-row { gap: 6px; margin: 4px 0; }
  #llmWeight .wbar-lbl { flex-basis: 91px; font-size: 10px; line-height: 1.2; }
  #llmWeight .wbar { height: 12px; }
  #llmWeight .wbar-legend { display: grid; grid-template-columns: minmax(0, 1fr);
    gap: 3px; margin-top: 6px; font-size: 11px; line-height: 1.3; }
  #llmWeight .wbar-legend > span { min-width: 0; overflow-wrap: anywhere; }
  #llmWeight .wbar-legend > span > span.dim:last-child { display: none; }
  #llmWeight .wbar-note.mobile-collapsible-note:not(.mobile-expanded) { display: none; }
  .mobile-explainer-toggle { display: block; width: 100%; min-height: 34px; margin-top: 7px;
    color: var(--acc2); background: var(--bg2); border: 1px solid var(--line);
    border-radius: 7px; font-size: 12px; cursor: pointer; }

  /* mobile-tables.js supplies the existing header text as each cell's label. */
  main .tblscroll { max-width: 100%; overflow-x: visible; }
  main table.tbl, main .tblscroll > table.tbl,
  main .tblscroll.narrow > table.tbl {
    display: block; width: 100%; min-width: 0; border: 0; background: transparent;
  }
  main table.tbl thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  main table.tbl tbody { display: grid; gap: 7px; min-width: 0; }
  main table.tbl tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 9px; padding: 8px 9px; min-width: 0; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  }
  main table.tbl tbody td,
  main table.tbl tbody td.num,
  main table.tbl tbody td.right {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 1px; min-width: 0; width: auto; padding: 0;
    border: 0; text-align: left; font-size: 12px; line-height: 1.3;
    white-space: normal; overflow-wrap: anywhere; word-break: break-word;
  }
  main table.tbl tbody td:first-child,
  main table.tbl tbody td[colspan] { grid-column: 1 / -1; }
  main table.tbl tbody td::before {
    content: attr(data-mobile-label); display: block; color: var(--mut);
    font: 600 9px/1.25 system-ui, sans-serif; letter-spacing: .04em;
    text-transform: uppercase;
  }
  main table.tbl tbody td:first-child::before { display: inline; margin-right: 5px; }
  main table.tbl tbody td[data-mobile-label=""]::before { display: none; }
  main table.tbl tbody td a.hash { white-space: normal; overflow-wrap: anywhere; }
  #compCard { padding: 7px; }
  #compCard table.tbl tbody { gap: 5px; }
  #compCard table.tbl tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #compCard table.tbl tbody td:first-child { grid-column: 1 / -1; }
  #compCard table.tbl tbody td:first-child::before { display: none; }
  #compCard table.tbl tbody td:nth-child(4)::before { content: "DAA ticks"; }
  #compCard table.tbl tbody td[colspan] { grid-column: span 2; }
  #compCard table.tbl tbody tr:last-child.dim { display: none; }
  #compCard > .dim { font-size: 10px; line-height: 1.35; }
  #compCard > .dim.mobile-composition-note:not(.mobile-expanded) {
    display: none;
  }
  .mobile-composition-toggle { display: block; width: 100%; min-height: 30px;
    margin-top: 5px; border: 0; color: var(--acc2); background: transparent;
    font-size: 11px; cursor: pointer; }
  main table.mobile-execution-table tbody tr { gap: 4px 8px; }
  main table.mobile-execution-table tbody td:nth-child(1):not([colspan]) { grid-column: 1; grid-row: 1; }
  main table.mobile-execution-table tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  main table.mobile-execution-table tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
  main table.mobile-execution-table tbody td:nth-child(4) { grid-column: 2; grid-row: 1; }
  main table.mobile-execution-table tbody td:nth-child(5) { grid-column: 1; grid-row: 3; }
  main table.mobile-execution-table tbody td:nth-child(6) { grid-column: 2; grid-row: 3; }
  /* Recent blocks are a feed, not nine-field forms. Keep identity, kind, model,
     claim, DAA and age visible; the linked block page has blue/parents/txs. */
  #recentWrap table.tbl tbody { gap: 0; }
  #recentWrap table.tbl tbody tr {
    grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px;
    padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line);
    border-radius: 0; background: transparent; overflow: visible;
  }
  #recentWrap table.tbl tbody td,
  #recentWrap table.tbl tbody td.num,
  #recentWrap table.tbl tbody td.right {
    display: block; grid-column: auto; width: auto; padding: 0; border: 0;
    font-size: 11px; line-height: 1.3; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #recentWrap table.tbl tbody td::before { display: none; }
  #recentWrap table.tbl tbody td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 12px; }
  #recentWrap table.tbl tbody td:nth-child(9) { grid-column: 2; grid-row: 1; color: var(--mut); text-align: right; }
  #recentWrap table.tbl tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  #recentWrap table.tbl tbody td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right; }
  #recentWrap table.tbl tbody td:nth-child(4) { grid-column: 1; grid-row: 3; }
  #recentWrap table.tbl tbody td:nth-child(4):empty { display: none; }
  #recentWrap table.tbl tbody td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; color: var(--dim); }
  #recentWrap table.tbl tbody td:nth-child(5)::before { content: "DAA "; display: inline; font-size: 10px; }
  #recentWrap table.tbl tbody td:nth-child(6),
  #recentWrap table.tbl tbody td:nth-child(7),
  #recentWrap table.tbl tbody td:nth-child(8) { display: none; }
  #recentWrap table.tbl tbody td a.hash { white-space: nowrap; overflow-wrap: normal; }
  #recentWrap table.tbl tbody td .pill { font-size: 10px; padding: 1px 5px; }
  main pre, main code { max-width: 100%; overflow-wrap: anywhere; }
  main pre { white-space: pre-wrap; }
}
@media (max-width: 360px) {
  #recentWrap table.tbl tbody tr { gap: 2px 5px; padding: 7px 6px; }
}
@media (min-width: 641px) {
  .mobile-nav-toggle, .mobile-overview-toggle,
  .mobile-explainer-toggle, .mobile-composition-toggle { display: none; }
}

/* Solscan light palette; color declarations only. */
:root { --bg:#f6f6f6; --bg2:#f6f6f6; --panel:#fff; --panel2:#fbfbfb;
  --line:#eaeaea; --txt:#282828; --mut:#606060; --dim:#8b8b8b;
  --acc:#009978; --acc2:#1890ff; --good:#1d8c45; --ok:#1d8c45;
  --bad:#da4444; --warn:#d9852b; color-scheme:light; }
.topbar { background:#1a1a1af5; border-color:#353535; color:#fff; }
.topbar .brand, .topbar .topnav a:hover, .topbar .topnav a.on,
.topbar .topnav a.active { color:#fff!important; }
.topbar .topnav a, .topbar .conn, .topbar .brand-tag { color:#eaeaea; }
.topbar .topnav a:hover { background:#353535; }
.topbar .topnav a.on, .topbar .topnav a.active { background:#009978; }
.topbar .brand-tag { background:#282828; border-color:#606060; }
.topbar .search input { background:#fff; border-color:#eaeaea; color:#353535; }
.topbar .search input::placeholder { color:#8b8b8b; }
.topbar .search button { background:#c74ae3; color:#fff; }
.upgrade-note { border-color:#ffe7ba; background:#fff6e3; }
.upgrade-note summary { color:#8c470e; }
.upgrade-note summary span { color:#b3641b; }
.upgrade-body { color:#663009; }
.tbl tbody tr:nth-child(even) { background:#fbfbfb; }
.tbl tbody tr:hover, .tbl tr:hover td { background:#f6f6f6; }
.scan-sub td { background:#f6f6f6; }
.scan-stale { background:#b3641b; color:#fff; }
@media(max-width:640px) {
  .topbar .mobile-nav-toggle { background:#282828; border-color:#606060; color:#fff; }
  .topbar .mobile-nav-toggle[aria-expanded="true"] { background:#353535; color:#19eabc; }
  .topbar .topnav { background:#1a1a1a; border-color:#353535; box-shadow:0 15px 30px #0003; }
  .topbar .topnav a { color:#eaeaea; }
  .topbar .topnav a:hover, .topbar .topnav a.on { color:#fff; }
  main table.tbl tbody tr, #recentWrap table.tbl tbody tr { background:#fff; }
  #recentWrap table.tbl tbody tr { border-color:#eaeaea; }
}

/* Solscan's type and identifier interaction, without changing table or card layout. */
@font-face { font-family:Roboto; src:url('/roboto-latin.woff2') format('woff2');
  font-style:normal; font-weight:400 700; font-display:swap; }
body { font-family:Roboto,system-ui,-apple-system,'Segoe UI',Arial,sans-serif; }
.hash, a.hash { font-family:Roboto,system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  font-weight:400; letter-spacing:normal; }
a.hash { color:#1890ff; font-size:14px; line-height:24px; padding:0 3px; margin-left:-3px;
  border-radius:4px; text-decoration:none; transition:color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1);
  -webkit-tap-highlight-color:#bde8ff; }
a.hash:hover { color:#0b6fda; background:#f0faff; text-decoration:none; }
a.hash:active { color:#0050b3; background:#bde8ff; }
a.hash:focus-visible { outline:2px solid #1890ff; outline-offset:2px; }
.identifier-value { display:inline-flex; align-items:center; flex-wrap:wrap; gap:8px; max-width:100%; }
.identifier-value .identifier-text { min-width:0; color:#353535; font-size:16px; line-height:24px;
  font-weight:400; overflow-wrap:anywhere; word-break:break-all; }
.kv .identifier-value .identifier-text { font-size:14px; }
.identifier-line { margin:0 0 4px; max-width:100%; }
.identifier-meta { color:#8b8b8b; font-size:14px; margin:0 0 16px; }
.crumbs { overflow-wrap:anywhere; }
.copy-identifier { position:relative; display:inline-flex; align-items:center; justify-content:center;
  flex:0 0 auto; width:24px; height:24px; padding:2px; border:0; border-radius:4px;
  background:transparent; color:#adb5bd; cursor:pointer; vertical-align:middle;
  transition:color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1);
  -webkit-tap-highlight-color:#bde8ff; }
.copy-identifier:hover { color:#0b6fda; background:#f0faff; }
.copy-identifier:active { color:#0050b3; background:#bde8ff; }
.copy-identifier:focus-visible { outline:2px solid #1890ff; outline-offset:2px; }
.copy-identifier[data-feedback]::after { content:attr(data-feedback); position:absolute;
  top:100%; left:50%; transform:translateX(-50%); background:#282828; color:#fff;
  padding:3px 7px; border-radius:4px; white-space:nowrap; font:12px/18px Roboto,sans-serif;
  box-shadow:0 2px 6px #0003; z-index:2; }
@media(max-width:640px) {
  .identifier-value .identifier-text { font-size:14px; line-height:21px; }
  .kv .identifier-value .identifier-text { font-size:14px; }
  .identifier-meta { font-size:12px; }
}
