:root {
  --ink: #0e0f12; --ink-2: #16181d; --ink-3: #1e2128; --line: #2a2e37; --line-2: #3a3f4b;
  --text: #f3efe7; --muted: #9a9fab; --coral: #ff5a45; --coral-2: #ff8a6b;
  --ok: #35d08a; --warn: #f5b942; --down: #ff5468;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.glow { position: fixed; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 80% at 20% 0%, rgba(255, 90, 69, .22), transparent 70%), radial-gradient(50% 70% at 85% 10%, rgba(255, 138, 107, .10), transparent 70%); }
header, main { position: relative; z-index: 1; }

/* top bar */
.top { position: sticky; top: 0; backdrop-filter: blur(14px); background: rgba(14, 15, 18, .72); border-bottom: 1px solid var(--line); z-index: 5; }
.top-row { display: flex; align-items: center; gap: .8rem; height: 60px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; text-decoration: none; }
.brand i { color: var(--coral); font-style: normal; margin-left: -.5rem; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--coral); color: #fff; font-size: .95rem; font-weight: 800; }
.tag { color: var(--muted); font-size: .82rem; border-left: 1px solid var(--line-2); padding-left: .8rem; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; padding: .32rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--muted); white-space: nowrap; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line-2); flex: none; }
.ok > .dot, .dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(53, 208, 138, .18); }
.warn > .dot, .dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 185, 66, .18); }
.down > .dot, .dot.down { background: var(--down); box-shadow: 0 0 0 3px rgba(255, 84, 104, .2); }
.pill.ok { color: var(--text); } .pill.warn { color: var(--warn); } .pill.down { color: var(--down); }

/* hero */
.hero { padding: 4.2rem 0 2.2rem; }
h1 { margin: 0; font-size: clamp(2.1rem, 5.4vw, 3.7rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 750; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--coral), var(--coral-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); max-width: 620px; margin: 1.1rem 0 1.8rem; font-size: 1.05rem; }
.lead b { color: var(--text); font-weight: 600; }
.shorten { display: flex; gap: .5rem; padding: .45rem; border: 1px solid var(--line-2); border-radius: 16px; background: var(--ink-2); max-width: 760px; transition: border-color .2s, box-shadow .2s; }
.shorten:focus-within { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 90, 69, .16); }
.shorten input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 1.05rem; padding: .7rem .8rem; }
.shorten input::placeholder { color: #6c7180; }
button { font: inherit; cursor: pointer; }
.shorten button { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 12px; padding: .7rem 1.25rem; font-weight: 650; color: #fff; background: linear-gradient(180deg, #ff6a55, #f2462f); box-shadow: 0 6px 18px rgba(255, 90, 69, .35); transition: transform .12s, filter .12s; }
.shorten button:hover { filter: brightness(1.08); } .shorten button:active { transform: translateY(1px); }
.shorten button:disabled { opacity: .6; cursor: default; }
.result { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .9rem; max-width: 760px; padding: .75rem .9rem; border-radius: 14px; border: 1px solid rgba(53, 208, 138, .35); background: rgba(53, 208, 138, .08); animation: rise .35s ease; }
.result[hidden] { display: none; }
.result-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ok); }
.result a { font-family: var(--mono); font-size: 1rem; flex: 1; min-width: 0; overflow-wrap: anywhere; text-decoration: none; }
.result a:hover { text-decoration: underline; }
.ghost { border: 1px solid var(--line-2); background: var(--ink-3); color: var(--text); border-radius: 9px; padding: .3rem .7rem; font-size: .82rem; transition: border-color .15s, background .15s; }
.ghost:hover { border-color: var(--coral); }
.msg { min-height: 1.5rem; margin-top: .6rem; font-size: .93rem; color: var(--down); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1rem; }
.tile { border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-radius: 16px; padding: 1rem 1.1rem; }
.tile small { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.tile b { display: block; font-size: 1.9rem; letter-spacing: -.03em; margin-top: .15rem; font-variant-numeric: tabular-nums; }

/* panels */
.panel { border: 1px solid var(--line); background: var(--ink-2); border-radius: 18px; padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
h2 { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; }
.hint { color: var(--muted); font-size: .8rem; font-family: var(--mono); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid2 .panel { margin-bottom: 0; }

/* live request path */
.flow { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: .4rem 0 .6rem; }
.node { flex: none; min-width: 128px; border: 1px solid var(--line-2); background: var(--ink-3); border-radius: 14px; padding: .7rem .85rem; transition: border-color .25s, box-shadow .25s, background .25s; }
.node-title { display: flex; align-items: center; gap: .45rem; font-weight: 650; font-size: .95rem; }
.node-sub { display: block; color: var(--muted); font-size: .74rem; font-family: var(--mono); margin-top: .15rem; white-space: nowrap; }
.node.ok { border-color: rgba(53, 208, 138, .45); }
.node.down { border-color: rgba(255, 84, 104, .7); background: rgba(255, 84, 104, .08); }
.node.hit { box-shadow: 0 0 0 4px rgba(255, 90, 69, .2); border-color: var(--coral); }
.node.store { border-style: dashed; }
.stack { display: flex; flex-direction: column; gap: .5rem; flex: none; }
.edge { flex: 1 1 36px; min-width: 30px; height: 2px; position: relative; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.edge span { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); opacity: 0; }
.edge.run span { animation: travel .55s ease-in-out; }
.edge.dead { background: repeating-linear-gradient(90deg, rgba(255, 84, 104, .7) 0 6px, transparent 6px 12px); }
@keyframes travel { 0% { left: 0; opacity: 1; } 100% { left: calc(100% - 8px); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.banner { margin-top: .8rem; border-radius: 12px; padding: .65rem .85rem; font-size: .9rem; animation: rise .3s ease; }
.banner[hidden] { display: none; }
.banner.down { background: rgba(255, 84, 104, .1); border: 1px solid rgba(255, 84, 104, .45); color: #ffb3bd; }
.banner.warn { background: rgba(245, 185, 66, .09); border: 1px solid rgba(245, 185, 66, .4); color: #f7d58c; }

/* table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; padding: 0 .6rem .6rem; border-bottom: 1px solid var(--line); }
td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; } tbody tr:hover { background: rgba(255, 255, 255, .025); }
tr.new { animation: flash 1.6s ease; }
@keyframes flash { from { background: rgba(255, 90, 69, .22); } to { background: transparent; } }
.short { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.short a { font-family: var(--mono); color: var(--coral-2); text-decoration: none; font-weight: 600; }
.short a:hover { text-decoration: underline; }
.copy { opacity: 0; border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 7px; font-size: .72rem; padding: .12rem .45rem; transition: opacity .15s, color .15s, border-color .15s; }
tr:hover .copy, .copy:focus { opacity: 1; } .copy:hover { color: var(--text); border-color: var(--coral); }
.dest { color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest b { color: var(--text); font-weight: 500; }
.when { color: var(--muted); white-space: nowrap; font-size: .85rem; }
.num { text-align: right; }
.clicks { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.bar { width: 90px; height: 6px; border-radius: 99px; background: var(--ink-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--coral), var(--coral-2)); transition: width .5s ease; }
.empty { color: var(--muted); text-align: center; padding: 1.4rem 0; }

/* charts */
.spark { width: 100%; height: 110px; display: block; }
.spark-line { fill: none; stroke: var(--coral); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-area { fill: rgba(255, 90, 69, .14); stroke: none; }
.spark-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: .76rem; font-family: var(--mono); margin-top: .35rem; }
.pods { display: flex; flex-direction: column; gap: .7rem; }
.pod-row { display: grid; grid-template-columns: minmax(0, 1fr) 2.6rem; gap: .25rem .7rem; align-items: center; }
.pod-name { font-family: var(--mono); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-name.last::after { content: "last"; margin-left: .5rem; font-size: .66rem; color: var(--coral-2); border: 1px solid rgba(255, 138, 107, .5); border-radius: 99px; padding: 0 .4rem; }
.pod-count { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; font-size: .9rem; grid-row: span 2; }
.pod-bar { height: 6px; border-radius: 99px; background: var(--ink-3); overflow: hidden; }
.pod-bar i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 99px; transition: width .5s ease; }

footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .82rem; padding: 1.4rem 0 3rem; }
footer a { color: var(--coral-2); text-decoration: none; } footer a:hover { text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: var(--ink); font-weight: 600; font-size: .9rem; padding: .55rem 1rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: rise .25s ease; z-index: 10; }
.toast[hidden] { display: none; }

@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .tag, #secure { display: none; }
  .hero { padding-top: 2.6rem; }
  .shorten { flex-direction: column; } .shorten button { justify-content: center; }
  .dest { max-width: 180px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
