/* Browser info. Tokens, header, footer and --c (the group colour) come from the site stylesheet. */

/* Page layout: an "On this page" list beside the content (separate from the site's tool sidebar). */
.bi {
  display: grid; grid-template-columns: 220px minmax(0, 820px); gap: 48px; justify-content: start;
  width: 100%; margin: 36px 0; padding: 0 32px;
}
.toc { position: sticky; top: calc(var(--top-h, 53px) + 24px); align-self: start; display: flex; flex-direction: column; }
.toc p { margin: 0 0 10px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.toc a {
  padding: 7px 14px; border-left: 3px solid var(--line); color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .12s, border-color .12s, background-color .12s;
}
.toc a:hover { color: var(--text); border-left-color: var(--edge); }
.toc a.on { color: var(--text); font-weight: 650; border-left-color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.bi-body > section { scroll-margin-top: calc(var(--top-h, 53px) + 20px); }

/* Not enough room for three columns: the list becomes a row of chips that sticks under the header. */
@media (max-width: 1240px) {
  .bi { grid-template-columns: minmax(0, 820px); gap: 0; justify-content: center; padding: 0 24px; }
  .toc {
    top: var(--top-h, 53px); z-index: 5; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin: 0 -24px 8px; padding: 10px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .toc p { display: none; }
  .toc a { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; background: var(--panel); }
  .toc a.on { border-color: var(--c); }
  .bi-body > section { scroll-margin-top: calc(var(--top-h, 53px) + 64px); }
}
.bi .mono { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }

.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin: 24px 0 16px; }
.tile-card { grid-column: span 3; color: inherit; text-decoration: none; }
.tile-card.ip { grid-column: span 6; }
a.tile-card b.mono { font-size: 15px; color: var(--c); }
.tile-card {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px;
  background: var(--panel); border: 1.5px solid var(--edge); border-radius: 14px; box-shadow: 4px 4px 0 var(--c);
}
.tile-card span { font-size: 12px; font-weight: 600; color: var(--muted); }
.tile-card b { font: 800 18px/1.25 var(--display); overflow-wrap: anywhere; }
.tile-card b.mono { font: 600 15px/1.35 var(--mono); }
.tile-card small { color: var(--muted); font-size: 12px; min-height: 1em; }
/* IP boxes are buttons: click to copy. */
.tile-card.ip { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.tile-card.ip:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--c); }
.tile-card.ip:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--c); }
.tile-card.ip b.mono { font-size: 16px; }
.tile-card.ip.copied small { color: var(--ok); font-weight: 600; }
.gps-btn {
  border: 1.5px solid var(--edge); background: var(--panel); border-radius: 10px; padding: 4px 12px;
  font-weight: 600; box-shadow: 2px 2px 0 var(--edge);
}
.gps-btn:disabled { opacity: .6; cursor: wait; }

.actions { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
#copy { border: 1.5px solid var(--edge); background: var(--panel); border-radius: 10px; padding: 6px 14px; font-weight: 600; box-shadow: 2px 2px 0 var(--edge); }
#copy:active { transform: translate(2px, 2px); box-shadow: none; }

.info { margin-top: 40px; }
.info h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 6px; }
.note-line { margin: 0 0 12px; font-size: 14.5px; color: var(--muted); max-width: 46em; }
.flag { width: 20px; height: 15px; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 12%); }
.info table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.info th, .info td { padding: 8px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.info tr:first-child > * { border-top: 0; }
.info th { width: 34%; font-weight: 500; color: var(--muted); }
.info td { overflow-wrap: anywhere; }
.info .headers th { color: var(--text); font-weight: 600; width: 30%; }

@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile-card, .tile-card.ip { grid-column: span 1; }
  .tile-card.ip { grid-column: 1 / -1; }
  .info th, .info td { display: block; width: auto; }
  .info td { border-top: 0; padding-top: 0; }
}


/* The fingerprint ID is the punchline: big and monospaced. */
.info td[data-js="fp-id"] { font: 700 22px/1.3 var(--mono); letter-spacing: .02em; color: var(--c); }
.info td[data-js="fp-canvas"], .info td[data-js="fp-audio"] { font-family: var(--mono); }

/* Where you are: IP lookup and device location side by side. */
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.loc-card { min-width: 0; padding: 14px 16px 6px; background: var(--panel); border: 1.5px solid var(--edge); border-radius: 14px; box-shadow: 4px 4px 0 var(--c); }
.loc-head b { display: block; font: 800 16px var(--display); }
.loc-head small { font-size: 12.5px; }
.loc-place { margin: 10px 0 6px; min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font: 700 17px/1.3 var(--display); }
.loc-place .flag { width: 24px; height: 18px; }
.info .loc-card table { border: 0; border-radius: 0; background: none; }
.info .loc-card th, .info .loc-card td { padding: 7px 0; font-size: 13.5px; }
.info .loc-card th { width: 46%; padding-right: 10px; }
.info .loc-card tr:first-child > * { border-top: 1px solid var(--line); }
@media (max-width: 760px) { .loc-grid { grid-template-columns: 1fr; } }

/* "?" beside a row label: its explanation shows on hover, keyboard focus or tap (tap focuses it). */
.tip {
  position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; vertical-align: 1px;
  border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; color: var(--muted); cursor: help;
}
.tip:hover, .tip:focus { color: var(--text); border-color: var(--edge); outline: none; }
.tip::after {
  content: attr(data-tip); position: absolute; left: -8px; top: calc(100% + 6px); z-index: 10; width: max-content; max-width: min(340px, 80vw);
  padding: 8px 10px; background: var(--panel); color: var(--text); border: 1.5px solid var(--edge); border-radius: 10px;
  box-shadow: 3px 3px 0 var(--c); font-size: 13px; font-weight: 400; line-height: 1.45; white-space: normal; text-align: left;
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
.tip:hover::after, .tip:focus::after { opacity: 1; visibility: visible; }

/* Rows that make this visitor stand out (a setting or tool most people don't have): tinted, with a bar. */
.info tr.notable > * { background: var(--warn-bg); }
.info tr.notable > th { color: var(--text); font-weight: 600; box-shadow: inset 4px 0 0 var(--amber); }
.info tr.notable:first-child > th { border-top-left-radius: 11px; }
.info tr.notable:first-child > td:last-child { border-top-right-radius: 11px; }
.info tr.notable:last-child > th { border-bottom-left-radius: 11px; }
.info tr.notable:last-child > td:last-child { border-bottom-right-radius: 11px; }
.info .loc-card tr.notable > th { padding-left: 10px; }
.info .loc-card tr.notable > *, .info .loc-card tr.notable > th { border-radius: 0; }
@media (max-width: 640px) {
  .info tr.notable > td { box-shadow: inset 4px 0 0 var(--amber); }
  .info tr.notable > th, .info tr.notable > td { border-radius: 0; }
}

/* Results shown after a button press: a long list (all fonts) folds away. */
.info td details summary { cursor: pointer; font-weight: 600; }
.info td details p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
