/* Phantom Proxy — free tools (services/): tool navigation, tool cards and results.
   Only the theme variables of style.css are used, so light and dark themes work as everywhere else. */

/* ---------- layout ---------- */
.tl { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tl-main { display: grid; gap: 52px; min-width: 0; }
.tl-main > .tl-credit { margin-top: -40px; }
@media (min-width: 1000px) {
  .tl { grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
}

/* ---------- tool navigation: one scrollable row of chips on phones, a sticky list on desktop ---------- */
.tl-nav {
  display: flex; gap: 4px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-sm);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tl-nav::-webkit-scrollbar { display: none; }
.tl-nav a {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  color: var(--fg-2); font-size: 14px; line-height: 1.25; white-space: nowrap; scroll-snap-align: start;
  transition: background .15s, color .15s;
}
.tl-nav a:hover { background: var(--panel-2); color: var(--head); text-decoration: none; }
.tl-nav a[aria-current='page'] { background: var(--acc-bg); color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
.tl-nav svg { width: 17px; height: 17px; flex: none; }
@media (min-width: 1000px) {
  .tl-nav {
    position: sticky; top: calc(var(--header-h) + 16px); flex-direction: column; overflow: visible;
    padding: 8px; border-radius: 18px;
  }
  .tl-nav a { padding: 9px 12px; white-space: normal; }
  .tl-nav a:first-child {
    margin-bottom: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0;
    color: var(--muted); font: 12.5px var(--mono);
  }
}
[data-theme='light'] .tl-nav { box-shadow: 0 10px 40px -22px rgba(20, 35, 25, .22); }

/* ---------- tool card ---------- */
.tl-card { min-width: 0; padding: 20px 18px; }
@media (min-width: 760px) { .tl-card { padding: 28px 30px 30px; } }
.tl-cmd { margin: 0 0 18px; font: 12.5px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.tl-cmd > span:first-child { color: var(--acc); }
.tl-cmd .cursor { width: .5em; height: 1em; vertical-align: -.14em; }

/* ---------- forms ---------- */
.tl-form { display: grid; gap: 14px; }
.tl-field { display: grid; gap: 8px; min-width: 0; }
.tl-lbl { margin: 0; font: 600 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tl-lbl-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.tl-dim { margin: 0; font: 12.5px var(--mono); color: var(--dim); }
.tl-dim.over { color: var(--amber); }
.tl-mono { font-family: var(--mono); }
.tl-hint { margin: 0; font-size: 13.5px; color: var(--muted); }
.tl-hint a { white-space: nowrap; }
.tl-note { margin-top: 16px; }
.tl-ta {
  min-height: 190px; padding: 12px 14px; resize: vertical; tab-size: 4;
  font: 13.5px/1.65 var(--mono); white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.tl-ta[readonly] { opacity: .7; }
.tl-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tl-actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tl-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.tl-inline .tl-grow { flex: 1 1 260px; }
.tl-inline .tl-port { flex: 0 0 112px; }
.tl-inline .input { min-height: 50px; font-size: 16px; }
.tl-inline .btn { flex: 0 0 auto; min-width: 132px; }
@media (max-width: 639px) {
  .tl-inline .tl-port { flex: 1 1 100px; }
  .tl-inline .btn { flex: 1 1 100%; }
  .tl-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .tl-actions .btn { width: 100%; }
}

/* segmented radio group */
.tl-seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2);
}
.tl-seg button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  color: var(--fg-2); font: 600 13px var(--mono); white-space: nowrap;
}
.tl-seg button:hover { color: var(--head); }
.tl-seg button[aria-checked='true'] { background: var(--panel); color: var(--acc); box-shadow: var(--shadow-sm), 0 0 0 1px var(--acc-line); }

/* status line under a form */
.tl-msg { margin: 0; font-size: 14px; color: var(--fg-2); }
.tl-msg:empty { display: none; }
.tl-msg.err { color: var(--red); }
.tl-msg.warn { color: var(--amber); }
.tl-card > .tl-msg { margin-top: 14px; }

/* ---------- results ---------- */
.tl-out { display: grid; gap: 14px; min-width: 0; margin-top: 24px; }
.tl-progress { display: grid; gap: 8px; }
.tl-bar { height: 8px; border-radius: 8px; background: var(--panel-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.tl-bar i { display: block; width: 0; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--acc-line), var(--acc)); transition: width .3s; }
.tl-bar-lg { height: 12px; }
.tl-bar.indet i { width: 32%; animation: tl-indet 1.3s ease-in-out infinite; }
@keyframes tl-indet { from { transform: translateX(-100%); } to { transform: translateX(320%); } }
[data-level='mid'] .tl-bar i { background: linear-gradient(90deg, rgba(244, 196, 106, .4), var(--amber)); }
[data-level='low'] .tl-bar i { background: linear-gradient(90deg, rgba(255, 122, 122, .4), var(--red)); }

.tl-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tl-toolbar .chip b { margin-left: 4px; font-weight: 600; opacity: .75; }
.tl-tb-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* status pill: a dot + a word */
.tl-st { display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px var(--mono); color: var(--muted); white-space: nowrap; }
.tl-st::before { content: ''; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--dim); }
.tl-st.ok { color: var(--acc); }
.tl-st.ok::before { background: var(--acc); box-shadow: 0 0 0 3px var(--acc-bg); }
.tl-st.bad { color: var(--red); }
.tl-st.bad::before { background: var(--red); }
.tl-st.warn { color: var(--amber); }
.tl-st.warn::before { background: var(--amber); }
.tl-st.wait::before { animation: blink 1.1s steps(1) infinite; }
.tl-sub { display: block; margin-top: 3px; font: 12px/1.4 var(--mono); color: var(--muted); white-space: normal; }

.tl-tbl { font-size: 14px; }
.tl-tbl th, .tl-tbl td { padding: 11px 14px; vertical-align: middle; }
.tl-tbl .mono { font-family: var(--mono); font-size: 13px; }
.tl-tbl .flag { display: inline-block; margin-right: 6px; vertical-align: -2px; }
.tl-tbl .dim { color: var(--dim); }
.tl-tbl tr[hidden] { display: none; }

/* proxy checker table → stacked rows on phones */
.tl-pc td:first-child { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 699px) {
  .tl-pc thead { display: none; }
  .tl-pc, .tl-pc tbody { display: block; }
  .tl-pc tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tl-pc tr:last-child { border-bottom: 0; }
  .tl-pc td { display: block; padding: 0; border: 0; white-space: normal; }
  .tl-pc td:first-child { flex: 1 1 calc(100% - 140px); max-width: none; overflow-wrap: anywhere; }
  .tl-pc td:nth-child(2) { flex: 0 0 auto; text-align: right; }
  .tl-pc td:nth-child(n+3) { font-size: 13px; }
  .tl-pc td:nth-child(n+3)::before { content: attr(data-label); display: block; font: 11px var(--mono); color: var(--dim); }
  .tl-pc td:empty { display: none; }
  .tl-pc .num { text-align: left; }
}

/* key → value list */
.tl-kv { display: grid; margin: 0; min-width: 0; }
.tl-kv-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tl-kv-row:last-child { border-bottom: 0; }
.tl-kv dt { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.tl-kv dd { margin: 0; min-width: 0; color: var(--head); font-size: 14.5px; overflow-wrap: anywhere; }
.tl-kv dd .tl-st { margin-left: 8px; vertical-align: 1px; }
.tl-kv-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--panel-2); color: var(--muted); }
.tl-kv-ico svg { width: 16px; height: 16px; }
@media (max-width: 559px) {
  .tl-kv-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tl-kv dd { padding-left: 40px; }
}

/* loading placeholder */
.tl-skel {
  display: inline-block; width: 9em; max-width: 100%; height: .9em; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, var(--panel-2) 0%, var(--line) 50%, var(--panel-2) 100%); background-size: 200% 100%;
  animation: tl-shimmer 1.3s linear infinite;
}
.tl-skel-lg { width: 11em; height: 1em; }
@keyframes tl-shimmer { to { background-position: -200% 0; } }

/* ---------- my IP ---------- */
.tl-ip-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tl-ip-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 30px; align-items: start; } }
.tl-ip-card, .tl-score {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0;
  padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2);
}
.tl-ip { margin: 0; max-width: 100%; font: 700 clamp(21px, 4.4vw, 28px)/1.2 var(--mono); color: var(--head); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tl-loc { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--fg-2); font-size: 14.5px; }
.tl-loc:empty { display: none; }
.tl-score-mini { display: grid; gap: 8px; width: 100%; margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.tl-score-head { display: flex; justify-content: space-between; align-items: baseline; font: 600 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tl-score-head b { font-size: 15px; color: var(--head); letter-spacing: 0; }

/* ---------- anonymity ---------- */
.tl-anon { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tl-anon { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 30px; align-items: start; } }
.tl-score .tl-bar { width: 100%; }
.tl-score-num { margin: 0; font: 700 58px/1 var(--mono); color: var(--head); letter-spacing: -.04em; }
.tl-score-num span { margin-left: 2px; font-size: 24px; color: var(--muted); }
[data-level='high'] .tl-score-num b { color: var(--acc); }
[data-level='mid'] .tl-score-num b { color: var(--amber); }
[data-level='low'] .tl-score-num b { color: var(--red); }
.tl-verdict { margin: 0; font-weight: 600; color: var(--head); }
.tl-checks { display: grid; margin: 0; padding: 0; list-style: none; min-width: 0; }
.tl-checks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tl-checks li:first-child { padding-top: 2px; }
.tl-checks li:last-child { border-bottom: 0; }
.tl-checks .tl-chk-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tl-checks b { color: var(--head); font-size: 15.5px; }
.tl-checks p { grid-column: 1 / -1; margin: 0; color: var(--fg-2); font-size: 14px; }
.tl-pen { font: 700 13px var(--mono); color: var(--red); white-space: nowrap; }
.tl-pen.zero { color: var(--dim); font-weight: 500; }

/* ---------- ping / traceroute / port scan ---------- */
.tl-target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font: 13.5px var(--mono); color: var(--fg-2); overflow-wrap: anywhere; }
.tl-target b { color: var(--head); }
.tl-stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .tl-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tl-stats li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.tl-stats span { display: block; font: 600 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tl-stats b { font: 700 19px var(--mono); color: var(--head); }
.tl-scan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.tl-scan-head .tl-hint { flex: 1 1 320px; max-width: 56ch; font-size: 14.5px; }
@media (max-width: 639px) { .tl-scan-head .btn { width: 100%; } }
.tl-ports { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .tl-ports { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tl-ports { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tl-ports li { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.tl-ports li b { font: 700 16px var(--mono); color: var(--head); }
.tl-ports li span { font-size: 12.5px; color: var(--muted); }
.tl-ports li.open { border-color: var(--acc-line); background: var(--acc-bg); }

/* ---------- WebRTC ---------- */
.tl-verdict-box {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--head); font-weight: 600;
}
.tl-verdict-box::before { content: ''; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--dim); }
.tl-verdict-box.ok { border-color: var(--acc-line); background: var(--acc-bg); }
.tl-verdict-box.ok::before { background: var(--acc); }
.tl-verdict-box.warn { border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.tl-verdict-box.warn::before { background: var(--amber); }
.tl-verdict-box.bad { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); }
.tl-verdict-box.bad::before { background: var(--red); }
.tl-verdict-box small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- fingerprint / evercookie ---------- */
.tl-fp-head, .tl-ever-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tl-fp-head > div, .tl-ever-head > div:first-child { display: grid; gap: 6px; min-width: 0; }
.tl-ever-head .tl-actions-row { margin-top: 0; }
.tl-fp th { width: 34%; color: var(--muted); font-weight: 500; white-space: normal; }
.tl-fp td { white-space: normal; overflow-wrap: anywhere; font: 13px/1.5 var(--mono); color: var(--head); }
.tl-ever td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 559px) {
  .tl-fp tr { display: grid; }
  .tl-fp th { width: auto; padding-bottom: 0; border-bottom: 0; }
  .tl-fp td { padding-top: 4px; }
}

/* ---------- "how it works" ---------- */
.tl-how-list { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) {
  .tl-how-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-how-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.tl-how-list li { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; }
.tl-how-n { font: 600 12px var(--mono); color: var(--acc); }
.tl-how-list b { color: var(--head); font-size: 16px; }
.tl-how-list p { margin: 0; color: var(--fg-2); font-size: 14.5px; }

.tl-credit { margin: 0; font: 12.5px var(--mono); color: var(--dim); }
.tl-credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.tl-credit a:hover { color: var(--acc); }

/* ---------- index ---------- */
.tl-index { display: grid; gap: 56px; }
.tl-tiles { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .tl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tl-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-tile { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px; color: var(--fg); transition: border-color .15s; }
.tl-tile b { margin-top: 6px; padding-right: 20px; color: var(--head); font-size: 17px; }
.tl-tile > span:not(.icon-tile) { color: var(--muted); font-size: 14.5px; }
.tl-tile em { position: absolute; top: 22px; right: 22px; font-style: normal; color: var(--acc); transition: transform .15s; }
.tl-tile:hover { border-color: var(--acc-line); text-decoration: none; }
.tl-tile:hover em { transform: translateX(3px); }
.tl-index .tl-notes { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .tl-index .tl-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl-notes li { display: grid; gap: 6px; padding: 20px 22px; }
.tl-notes b { color: var(--head); font-size: 16px; }
.tl-notes p { margin: 0; color: var(--fg-2); font-size: 14.5px; }
.tl-index > .tl-credit { margin-top: -36px; }
