/* Jisoo line monitor - same green-screen look as the India DID Switchboard (naor :4460). Mobile first (375px). */
:root {
  --screen: #0a120c; --panel: #0f1a11; --line: #1f3a22; --bg: #050806;
  --ph: #8cff7a; --dim: #7fbf76; --amber: #ffb340; --red: #ff6b5e; --ink: #0a120c;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--ph); font-family: var(--mono); font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.sb { position: relative; max-width: 1180px; margin: 0 auto; background: var(--screen); border: 2px solid var(--line);
  border-radius: 12px; padding: 16px; overflow: hidden; text-shadow: 0 0 4px rgba(140,255,122,.3); }
.sb::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.18) 2px 3px); }
.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between;
  border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
h1 { margin: 0; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; }
h1 .cur { display: inline-block; width: .6em; height: 1em; vertical-align: -0.12em; background: var(--ph); margin-left: 6px; }
h2 { font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
h2 span, .dim { color: var(--dim); font-weight: 400; }
p { margin: .6em 0; }
a { color: var(--amber); }
section { margin-top: 20px; }
.status { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ph); box-shadow: 0 0 8px var(--ph); margin-right: 6px; }
.led.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.led.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.led.off { background: var(--line); box-shadow: none; }
@media (prefers-reduced-motion: no-preference) { h1 .cur { animation: blink 1.1s steps(1) infinite; } .led.live { animation: pulse 2s ease-in-out infinite; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }

/* readout cubes */
.readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.cell { border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; min-height: 76px; min-width: 0; }
.cell .lab { font-size: .72rem; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.cell .val { font-size: 1.5rem; margin-top: 4px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .unit { font-size: .75rem; color: var(--dim); margin-left: 4px; }
.cell.bad .val { color: var(--red); } .cell.warn .val { color: var(--amber); }

/* verdict banner */
.verdict { border: 2px solid var(--ph); padding: 12px 14px; margin: 14px 0; }
.verdict .t { font-size: 1.2rem; letter-spacing: .1em; text-transform: uppercase; }
.verdict ul { margin: 8px 0 0; padding-left: 1.1em; font-size: .9rem; color: var(--dim); }
.verdict.their, .verdict.path { border-color: var(--amber); color: var(--amber); }
.verdict.ours { border-color: var(--red); color: var(--red); }
.verdict.unclear { border-color: var(--line); color: var(--dim); }

/* cards (list of monitors, hops, targets) */
.cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.card { border: 1px solid var(--line); background: var(--panel); padding: 12px; min-width: 0; }
.card .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.card .name { font-size: 1rem; overflow-wrap: anywhere; }
.card .meta { font-size: .8rem; color: var(--dim); overflow-wrap: anywhere; }
a.card { display: block; color: inherit; text-decoration: none; min-height: 44px; }
a.card:hover, a.card:focus-visible { background: rgba(140,255,122,.07); }
.pill { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border: 1px solid currentColor; white-space: nowrap; }
.pill.active, .pill.good { color: var(--ph); } .pill.pending, .pill.their, .pill.path, .pill.new { color: var(--amber); }
.pill.ours, .pill.refused, .pill.rejected { color: var(--red); } .pill.stopped, .pill.expired, .pill.unclear { color: var(--dim); }

/* hops: cards on phones, table from 768px */
.hops { display: grid; gap: 6px; font-size: .85rem; }
.hop { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 2px 8px; border-bottom: 1px dotted var(--line); padding: 6px 0; }
.hop .ip { overflow-wrap: anywhere; } .hop .as { grid-column: 2 / 4; color: var(--dim); font-size: .78rem; overflow-wrap: anywhere; }
.hop .l.bad { color: var(--red); }
.hop.origin { background: rgba(255,179,64,.10); }

/* forms + buttons */
label { display: block; margin: 10px 0 4px; }
input[type=text], input[type=password] { width: 100%; font: inherit; font-size: 16px; color: var(--ph); background: var(--panel);
  border: 1px solid var(--line); padding: 10px 12px; min-height: 44px; border-radius: 0; }
input::placeholder { color: var(--dim); opacity: .8; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; min-height: 44px; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--ph); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 10px 16px;
  font: inherit; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ph); background: transparent;
  border: 1px solid var(--ph); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--ph); color: var(--ink); text-shadow: none; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger.primary { background: var(--red); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[aria-pressed="true"] { background: var(--ph); color: var(--ink); text-shadow: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 8px; justify-content: center;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(5,8,6,.96); border-top: 1px solid var(--line); }
.sticky .btn { flex: 1 1 0; max-width: 360px; }
.err { color: var(--red); } .ok { color: var(--ph); } .warn { color: var(--amber); }
.note { font-size: .85rem; color: var(--dim); }
.box { border: 1px solid var(--line); background: var(--panel); padding: 12px; overflow-wrap: anywhere; }
.copy { display: flex; gap: 8px; flex-wrap: wrap; } .copy input { flex: 1 1 14rem; min-width: 0; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-top: 12px; overflow-x: auto; }
.tab { flex: 1 0 auto; background: transparent; color: var(--dim); border: 1px solid transparent; border-bottom: 0; font: inherit;
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ph); border-color: var(--line); background: var(--panel); margin-bottom: -1px; }
.chart { position: relative; height: 200px; margin-top: 8px; }
.meter { display: block; height: 12px; background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 8px); position: relative; margin: 8px 0; }
.meter i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: repeating-linear-gradient(to right, var(--ph) 0 6px, transparent 6px 8px); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 480px) { .readout { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); } }
@media (min-width: 768px) {
  body { padding-top: 20px; }
  .sb { padding: 20px; }
  h1 { font-size: 1.35rem; }
  .cards.grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .hop { grid-template-columns: 2.2em minmax(9em, 1fr) minmax(10em, 2fr) 5em 5em 5em; }
  .hop .as { grid-column: auto; }
  .chart { height: 240px; }
  .sticky { position: static; padding: 0; background: none; border: 0; justify-content: flex-start; margin-top: 16px; }
  body { padding-bottom: 24px; }
}
