/* Listing Studio — machine console
   Ink graphite, paper grey, signal blue. Status lights carry state.
   Space Grotesk (display) + IBM Plex Sans (body) + IBM Plex Mono (machine output) */
:root {
  --ink: #16202B; --ink-2: #2C3A4B;
  --steel: #6A7788; --steel-2: #A3ADBA;
  --paper: #EFF1EE; --panel: #FFFFFF; --line: #D5D9D6;
  --signal: #2B59FF; --signal-d: #1E42C7; --signal-bg: #EAEFFF;
  --ok: #1F7A4C; --ok-bg: #E7F4ED;
  --warn: #B07D08; --warn-bg: #FCF3DE;
  --stop: #B33A2B; --stop-bg: #FBEBE8;
  --r: 6px;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.6;
  background: var(--paper); color: var(--ink);
}
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; font-weight: 600;
  letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.05rem; margin: 2rem 0 0.7rem; }
h3 { font-size: 1rem; }
.mono { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; }
.sub { color: var(--steel); margin: 0.2rem 0 0; font-size: 0.92rem; }
a { color: var(--signal); }

.topbar { background: var(--ink); color: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 1.2rem; height: 52px;
  border-bottom: 3px solid var(--signal); }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #fff; }
.eye { width: 22px; height: 22px; border-radius: 5px; background: #0C1520;
  border: 1px solid #33404F; display: grid; place-items: center; flex: none; }
.eye i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 6px var(--signal); animation: blink 2.6s infinite; }
@keyframes blink { 0%,92%,100% { opacity: 1; } 95% { opacity: 0.25; } }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.topbar nav { display: flex; align-items: center; gap: 1.3rem; font-size: 0.9rem; }
.topbar nav a { color: #B9C3CE; text-decoration: none; font-weight: 500;
  border-bottom: 2px solid transparent; padding: 4px 0; }
.topbar nav a:hover { color: #fff; border-bottom-color: var(--signal); }
.who { color: var(--steel); font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; }

.wrap { width: min(940px, 94vw); margin: 1.8rem auto 3rem; flex: 1; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  margin-bottom: 1.4rem; flex-wrap: wrap; }

.flashes { width: min(940px, 94vw); margin: 1rem auto -0.6rem; }
.flash { padding: 0.7rem 0.9rem; margin-bottom: 0.5rem; border-left: 3px solid;
  border-radius: 0 var(--r) var(--r) 0; font-size: 0.9rem; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.flash-error { background: var(--stop-bg); color: var(--stop); border-color: var(--stop); }
.note { background: var(--warn-bg); border: 1px solid #EBD9A8; border-radius: var(--r);
  padding: 0.7rem 0.9rem; font-size: 0.88rem; margin-bottom: 1.2rem; }
.note code { font-family: "IBM Plex Mono", monospace; font-size: 0.85em; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.3rem; }
.panel + .panel { margin-top: 1rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.9rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.1rem; display: flex; flex-direction: column; gap: 0.85rem; }
.card-top { display: flex; align-items: center; gap: 0.55rem; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 5px var(--ok); flex: none; }
.card-meta { color: var(--steel); font-family: "IBM Plex Mono", monospace; font-size: 0.74rem;
  display: flex; flex-direction: column; gap: 2px; }
.card-acts { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid transparent;
  border-radius: var(--r); padding: 0.5rem 0.9rem; font-family: "Space Grotesk", sans-serif;
  font-weight: 600; font-size: 0.88rem; text-decoration: none; cursor: pointer; }
.go { background: var(--signal); color: #fff; }
.go:hover { background: var(--signal-d); }
.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.ghost:hover { border-color: var(--ink); }
.stop { background: transparent; color: var(--stop); border-color: #EBC9C2; }
.stop:hover { background: var(--stop-bg); }
.big { width: 100%; justify-content: center; padding: 0.85rem; font-size: 1rem; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-sm { padding: 0.32rem 0.6rem; font-size: 0.8rem; }

label { display: block; font-weight: 500; font-size: 0.88rem; margin-bottom: 0.9rem; }
.tip { font-weight: 400; color: var(--steel); font-size: 0.8rem; }
input, textarea, select { display: block; width: 100%; margin-top: 0.28rem;
  padding: 0.5rem 0.65rem; border: 1px solid var(--line); border-radius: var(--r);
  font: inherit; font-size: 0.92rem; background: #FCFCFB; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--signal);
  border-color: var(--signal); }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; }
.req { color: var(--stop); }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--steel); padding: 0 0 0.6rem;
  border-bottom: 1px solid var(--line); width: 100%; margin-bottom: 0.9rem; }

.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1rem; }
.pick { margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 0.75rem;
  cursor: pointer; display: flex; gap: 0.55rem; align-items: flex-start; background: #FCFCFB; }
.pick input { width: auto; margin: 0.25rem 0 0; }
.pick b { display: block; font-size: 0.9rem; }
.pick em { font-style: normal; color: var(--steel); font-size: 0.78rem; }
.pick:has(input:checked) { border-color: var(--signal); background: var(--signal-bg); }

details.adv { border: 1px solid var(--line); border-radius: var(--r); background: #FCFCFB;
  margin-bottom: 0.7rem; }
details.adv summary { cursor: pointer; padding: 0.65rem 0.9rem; font-weight: 500;
  font-size: 0.88rem; display: flex; align-items: center; gap: 0.5rem; list-style: none; }
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary::before { content: "+"; font-family: "IBM Plex Mono", monospace;
  color: var(--signal); font-weight: 600; }
details.adv[open] summary::before { content: "\2212"; }
details.adv summary span { color: var(--steel); font-weight: 400; font-size: 0.8rem; }
details.adv .body { padding: 0.2rem 0.9rem 0.9rem; }

.rail { background: var(--ink); border-radius: var(--r); padding: 1rem 1.1rem; color: #fff;
  margin-bottom: 1rem; }
.stations { display: flex; gap: 0; margin-bottom: 0.8rem; }
.st { flex: 1; display: flex; align-items: center; gap: 0.45rem; font-size: 0.74rem;
  color: #7B8798; font-family: "IBM Plex Mono", monospace; }
.st .dot { width: 9px; height: 9px; border-radius: 50%; background: #3A4756; flex: none; }
.st.done .dot { background: var(--ok); box-shadow: 0 0 5px var(--ok); }
.st.done { color: #C6D0DA; }
.st.now .dot { background: var(--signal); box-shadow: 0 0 7px var(--signal);
  animation: pulse 1s infinite; }
.st.now { color: #fff; }
@keyframes pulse { 50% { transform: scale(0.65); } }
.log { font-family: "IBM Plex Mono", monospace; font-size: 0.73rem; color: #93A0AE;
  background: #0D1620; border-radius: 4px; padding: 0.55rem 0.7rem; min-height: 2.4rem;
  max-height: 8rem; overflow-y: auto; }
.log .ok { color: #6FCF97; }
.log .err { color: #F08A7D; }

.chip { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 0.68rem;
  letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid var(--steel-2);
  color: var(--steel); border-radius: 3px; padding: 0.1rem 0.4rem; }
.chip.ok { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.chip.bad { border-color: var(--stop); color: var(--stop); background: var(--stop-bg); }
.chip.on { border-color: var(--signal); color: var(--signal); background: var(--signal-bg); }

.score { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.score b { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; }
.bar { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 0.5rem; padding: 0.32rem 0; font-size: 0.86rem;
  border-top: 1px solid var(--line); }
.checks li:first-child { border: 0; }
.checks .m { color: var(--steel); font-size: 0.8rem; }
.tick { font-family: "IBM Plex Mono", monospace; flex: none; width: 14px; }
.tick.y { color: var(--ok); }
.tick.n { color: var(--warn); }

.meter { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.2rem;
  font-size: 0.8rem; color: var(--steel); }
.meter .bar { max-width: 160px; }
.meter .bar i { background: var(--signal); }

table { width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
th { font-family: "IBM Plex Mono", monospace; font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-align: left; background: var(--ink); color: #C6D0DA;
  padding: 0.55rem 0.7rem; font-weight: 500; }
td { padding: 0.55rem 0.7rem; border-top: 1px solid var(--line); font-size: 0.86rem;
  vertical-align: top; }
td.dim { color: var(--steel); font-size: 0.78rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem; margin-bottom: 1.4rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 0.9rem; }
.stat b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.6rem;
  line-height: 1.2; }
.stat span { color: var(--steel); font-size: 0.78rem; font-family: "IBM Plex Mono", monospace; }

.auth { max-width: 380px; margin: 3rem auto; }
.auth .panel { margin-top: 1rem; }
.alt { text-align: center; margin-top: 0.9rem; color: var(--steel); font-size: 0.88rem; }

.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r);
  padding: 2.2rem; text-align: center; color: var(--steel); }
.foot { border-top: 1px solid var(--line); padding: 1.2rem; text-align: center;
  color: var(--steel); font-size: 0.78rem; }
.foot p { margin: 0.25rem 0; }
.tm { font-size: 0.7rem; color: var(--steel-2); max-width: 580px; margin: 0.4rem auto 0; }

@media (max-width: 620px) {
  .head { flex-direction: column; align-items: flex-start; }
  .picks { grid-template-columns: 1fr; }
  .stations { flex-wrap: wrap; gap: 0.5rem; }
  .st { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
