/* lg.sonet.com.tr front end (sonet). Light UI, dark terminal for raw output. System fonts only (CSP font-src 'self'). */

:root {
  --ink: #0f1431;
  --ink-2: #3b4361;
  --ink-3: #69718d;
  --ink-4: #9aa1b8;
  --line: #e3e7ef;
  --line-2: #cdd4e1;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --navy: #231d92;
  --navy-hover: #1b1678;
  --cyan: #1497d4;
  --cyan-soft: #e6f5fc;
  --ok: #158a5b;
  --ok-soft: #e4f5ed;
  --warn: #b7791f;
  --warn-soft: #fcf3e3;
  --bad: #c93545;
  --bad-soft: #fbe9eb;
  --term-bg: #0c1226;
  --term-ink: #d6deee;
  --term-dim: #7f8aa6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 20, 49, .05), 0 10px 30px -16px rgba(15, 20, 49, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--navy); }
a:hover { color: var(--cyan); }
button, input, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; }
.brand img { display: block; height: 30px; width: auto; }
.topbar-meta { display: flex; align-items: center; gap: 12px; }
.product { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); letter-spacing: -.005em; }
.asn-pill {
  font: 600 12.5px/1 var(--mono);
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--cyan-soft);
  text-decoration: none;
}
.asn-pill:hover { color: var(--navy); background: #d4eefa; }

/* composer */
.composer {
  margin: 28px 0 22px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

.qtypes {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.qt { position: relative; flex: 0 0 auto; }
.qt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.qt span {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.qt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qt input:hover + span { color: var(--ink); }
.qt input:checked + span {
  color: var(--navy);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 20, 49, .08), 0 0 0 1px var(--line);
}
.qt input:checked + span svg { stroke: var(--cyan); }
.qt input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 1px; }
.qt.is-unavailable input { cursor: not-allowed; }
.qt.is-unavailable span { opacity: .38; }
.qt.is-unavailable input:hover + span { color: var(--ink-3); }

.target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: 14px;
  margin-top: 18px;
}
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.param-wrap { position: relative; }
#parameter {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 16px;
  font: 500 18px/1 var(--mono);
  letter-spacing: -.01em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
#parameter::placeholder { color: var(--ink-4); }
#parameter:hover { border-color: #b5bed0; }
#parameter:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(35, 29, 146, .10); }
#parameter[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(201, 53, 69, .10); }
.slash-hint {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font: 600 12px/1 var(--mono);
  color: var(--ink-4);
  padding: 4px 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  pointer-events: none;
}
#parameter:focus + .slash-hint { opacity: 0; }

.hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.hint-sep { margin: 0 6px; color: var(--ink-4); }
.linkish {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--navy); font-size: 13px; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(35, 29, 146, .3); text-underline-offset: 3px;
}
.linkish:hover { color: var(--cyan); text-decoration-color: currentColor; }
.hint-sep[hidden], .linkish[hidden] { display: none; }
.field-error { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--bad); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
#router, .router-static {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 600;
}
select#router { appearance: none; padding-right: 40px; cursor: pointer; }
select#router:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(35, 29, 146, .10); }
.router-static { display: flex; align-items: center; gap: 10px; background: var(--bg); border-color: var(--line); color: var(--ink-2); }
.router-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.run-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.captcha-slot { min-height: 78px; display: flex; flex-direction: column; justify-content: center; }
.captcha { border-radius: 4px; transition: box-shadow .2s; }
.captcha.is-needed { box-shadow: 0 0 0 3px var(--bad-soft), 0 0 0 4px var(--bad); }
.captcha-msg { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--bad); }
.run {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 168px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .005em;
  cursor: pointer;
  transition: background-color .15s, transform .05s;
}
.run:hover { background: var(--navy-hover); }
.run:active { transform: translateY(1px); }
.run:disabled { cursor: progress; background: #5a56a8; }
.run-spinner {
  display: none;
  width: 18px; height: 18px; margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.run.is-busy .run-spinner { display: inline-block; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* results */
.results { margin-bottom: 40px; display: flex; flex-direction: column; gap: 16px; }
.empty { padding: 4px 2px; }
.empty-title { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.example {
  padding: 7px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
}
.example .mono { color: var(--navy); font-weight: 600; }
.example:hover { border-style: solid; border-color: var(--navy); background: var(--surface); }

.result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise .18s ease-out;
}
.result-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.badge {
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px;
  color: var(--navy); background: var(--cyan-soft);
}
.result-target { font: 600 16px/1.2 var(--mono); color: var(--ink); word-break: break-all; }
.result-from { font-size: 13px; color: var(--ink-3); }
.result-meta { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.result-meta time, .elapsed { white-space: nowrap; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.state-running { color: var(--cyan); }
.state-running::before { animation: pulse 1.2s ease-in-out infinite; }
.state-ok { color: var(--ok); }
.state-error { color: var(--bad); }
.result-actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--ink-3);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--ink); background: var(--bg); border-color: var(--line); }
.icon-btn.is-done { color: var(--ok); }

.result-body { padding: 16px; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--cyan); border-radius: 3px; transition: width .4s linear; }
.running-text { margin: 12px 0 0; color: var(--ink-3); font-size: 14px; }
.error-box {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bad-soft); color: #8f1f2c; font-weight: 550;
}
.err-ico { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--bad); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note { margin: 0; color: var(--ink-3); }
.note-strong { color: var(--ink-2); font-weight: 600; }

/* route view */
.routes { display: flex; flex-direction: column; gap: 14px; }
.route + .route { padding-top: 14px; border-top: 1px dashed var(--line); }
.route-prefix { font: 650 20px/1.2 var(--mono); letter-spacing: -.01em; }
.route-attrs { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 12px 0 0; }
.route-attrs dt { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.route-attrs dd { margin: 0; min-width: 0; }
.aspath { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; }
.asn {
  font: 600 13.5px/1 var(--mono);
  padding: 5px 8px; border-radius: 6px;
  border: 1px solid var(--line-2); color: var(--ink); background: var(--surface);
  text-decoration: none;
}
a.asn:hover { border-color: var(--navy); color: var(--navy); }
.asn-origin { border-color: var(--cyan); background: var(--cyan-soft); color: var(--navy); }
.asn-sep { width: 14px; height: 14px; color: var(--ink-4); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 12.5px/1 var(--mono); padding: 5px 7px; border-radius: 5px; background: var(--bg); color: var(--ink-2); }
.origin-tag { font: 600 13px/1 var(--mono); color: var(--ink-2); }
.route-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.route-table th { text-align: left; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
.route-table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.route-table tr:last-child td { border-bottom: 0; }
.route-table .route-prefix { font-size: 14.5px; }

/* ping view */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stat { padding: 10px 12px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { display: block; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.stat-value { display: block; margin-top: 2px; font: 650 19px/1.25 var(--mono); font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.is-ok { color: var(--ok); }
.is-warn { color: var(--warn); }
.is-bad { color: var(--bad); }
.is-muted { color: var(--ink-4); }
.probes { display: flex; align-items: flex-end; gap: 6px; height: 44px; margin-top: 14px; padding: 0 2px; }
.probe { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 6px; }
.probe-bar { display: block; border-radius: 3px 3px 1px 1px; background: var(--cyan); min-height: 3px; opacity: .85; }
.probe:hover .probe-bar { opacity: 1; background: var(--navy); }
.probe-lost .probe-bar { background: var(--bad); height: 6px !important; }
.probes-axis { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11.5px/1 var(--mono); color: var(--ink-4); }

/* traceroute view */
.table-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.hops { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hops th {
  text-align: right; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.hops th:nth-child(1), .hops th:nth-child(2), .hops th:last-child { text-align: left; }
.hops td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 13.5px; }
.hops tr:last-child td { border-bottom: 0; }
.hops td.hop-n { text-align: left; color: var(--ink-4); width: 36px; font-weight: 600; }
.hops td.hop-addr { text-align: left; font-weight: 600; color: var(--ink); }
.hops td.hop-addr .alt { display: block; font-weight: 500; color: var(--ink-3); }
.hops td.hop-bar { width: 32%; min-width: 120px; }
.hops tr.is-target td.hop-addr { color: var(--navy); }
.hop-internal { font: 600 11.5px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; }
.hop-noreply { color: var(--ink-4); font-weight: 500; }
.bar { position: relative; height: 8px; border-radius: 4px; background: var(--bg); }
.bar > span { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--cyan); }
.bar > span.range { background: rgba(20, 151, 212, .22); }
.bar > i { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 1px; background: var(--navy); }
tr.is-lossy .bar > span:not(.range) { background: var(--warn); }

/* raw output */
.raw { border-top: 1px solid var(--line); }
.raw summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
}
.raw summary::-webkit-details-marker { display: none; }
.raw summary::before {
  content: ""; width: 6px; height: 6px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s;
}
.raw[open] summary::before { transform: rotate(45deg); }
.raw summary:hover { color: var(--ink); }
.raw pre, pre.terminal {
  margin: 0;
  padding: 14px 16px;
  max-height: 460px;
  overflow: auto;
  background: var(--term-bg);
  color: var(--term-ink);
  font: 13px/1.55 var(--mono);
  tab-size: 8;
}
pre.terminal { border-radius: var(--radius-sm); }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { padding: 22px 20px 26px; font-size: 13px; color: var(--ink-3); }
.footer-inner p { margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--navy); }
.copyright { color: var(--ink-4); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .topbar-inner { height: 60px; }
  .brand img { height: 24px; }
  .product { font-size: 14px; white-space: nowrap; }
  .asn-pill { display: none; }
  .composer { margin-top: 16px; padding: 16px; }
  .qtypes { display: flex; width: 100%; }
  .qt { flex: 1 1 0; }
  .qt span { justify-content: center; padding: 8px 6px; font-size: 13.5px; }
  .qt svg { display: none; }
  .target-row { grid-template-columns: 1fr; }
  .run-row { flex-direction: column; align-items: stretch; }
  .captcha-slot { align-items: center; }
  .run { width: 100%; }
  .slash-hint { display: none; }
  #parameter { padding-right: 16px; font-size: 17px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .result-meta { margin-left: 0; width: 100%; }
  .result-actions { margin-left: auto; }
  .icon-btn { padding: 0 8px; }
  .icon-btn span { display: none; }
  .route-attrs { grid-template-columns: 1fr; gap: 2px; }
  .route-attrs dd { margin-bottom: 8px; }
}

@media (max-width: 560px) {
  .hops { min-width: 0; }
  .hops th:nth-child(5), .hops td:nth-child(5), .hops th:nth-child(6), .hops td:nth-child(6) { display: none; }
  .hops th, .hops td { padding-left: 6px; padding-right: 6px; }
  .hops td.hop-bar { width: 22%; min-width: 48px; }
  .hops td.hop-n { width: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
