/*
  firmware.css — the Observed Update Log becomes an attention target.

  The log used to be a plain <table class="spec">. It is now a grid of
  focusable rows so each one can carry its own pulse track, status
  readout and completion state. Everything below is deliberately styled
  to match .spec exactly at rest -- same mono face, same 0.82rem, same
  9px/10px padding, same hairline rule -- so a visitor who never hovers
  sees precisely the table that was always there.
*/

.fw-log{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.82rem;
  margin:1.4em 0 1.8em;
  border-top:1px solid transparent;   /* keeps spacing identical to .spec */
}

.fw-row{
  position:relative;
  display:grid;
  grid-template-columns:120px minmax(0,1fr) auto;
  align-items:baseline;
  gap:10px;
  padding:9px 10px;
  border-bottom:1px solid var(--line);
  cursor:default;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  transition:background 0.35s ease, box-shadow 0.35s ease;
}
.fw-row:focus{outline:none;}
.fw-row:focus-visible{
  outline:1px solid var(--line-strong);
  outline-offset:-1px;
}

.fw-num{
  color:var(--cyan);
  letter-spacing:0.05em;
  font-weight:600;
  transition:color 0.5s ease, text-shadow 0.5s ease;
}
.fw-text{
  color:var(--ink);
  transition:color 0.5s ease, text-shadow 0.5s ease;
}
.fw-status{
  font-size:0.62rem;
  letter-spacing:0.14em;
  line-height:1.45;
  text-align:right;
  color:var(--ink-soft);
  opacity:0;
  white-space:nowrap;
  transition:opacity 0.3s ease, color 0.3s ease;
}
.fw-status[data-show="1"]{opacity:0.9;}
.fw-status[data-tone="warn"]{color:var(--gold);}
.fw-status[data-tone="ok"]{color:var(--teal);}
.fw-status[data-tone="live"]{color:var(--cyan-glow);}

/* the pulse rides the row's own bottom rule */
.fw-pulse{
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  width:100%;
  height:2px;
  display:block;
  overflow:visible;
  pointer-events:none;
}
.fw-pulse-fill{fill:var(--cyan);opacity:0.85;}
.fw-pulse-head{fill:var(--cyan-glow);opacity:0;}

/* --- attention being held --- */
.fw-row.attending{background:rgba(69,211,232,0.05);}
.fw-row.attending .fw-num{color:var(--cyan-glow);}
.fw-row.attending .fw-text{color:#FFFFFF;}
.fw-row.attending .fw-pulse-head{opacity:1;}

/* --- acknowledged for good --- */
.fw-row.done{
  background:rgba(70,224,166,0.04);
  cursor:default;
}
.fw-row.done .fw-num{color:var(--teal);text-shadow:0 0 8px rgba(70,224,166,0.45);}
.fw-row.done .fw-text{color:var(--teal);}
.fw-row.done .fw-pulse-fill{fill:var(--teal);opacity:0.55;}
.fw-row.done .fw-pulse-head{opacity:0;}

/* ARTIFACT PATHWAY AVAILABLE is too wide for the status column beside a
   full-width log row, so it breaks across two lines. On mobile the status
   already has a whole row to itself and needs no break. */
.fw-status-br{display:inline;}

/* the acknowledged counter that appears beside the heading */
.fw-progress{
  display:inline-block;
  margin-left:14px;
  font-family:'IBM Plex Mono', monospace;
  font-size:0.58rem;
  letter-spacing:0.14em;
  color:var(--ink-soft);
  vertical-align:middle;
  opacity:0;
  transition:opacity 0.5s ease;
}
.fw-progress[data-show="1"]{opacity:0.85;}
.fw-progress b{color:var(--teal);font-weight:600;}

/* ============================================================
   LINE 005 — the update that writes itself
   ============================================================ */

.fw-row-005{
  border-bottom-color:var(--line-strong);
}
.fw-row-005 .fw-num{color:var(--gold);}
.fw-row-005 .fw-text{color:var(--gold);}
.fw-row-005 .fw-pulse-fill{fill:var(--gold);}
.fw-row-005 .fw-pulse-head{fill:#FFE3AE;}
.fw-row-005.attending{background:rgba(232,169,74,0.07);}
.fw-row-005.attending .fw-num,
.fw-row-005.attending .fw-text{color:#FFD48A;}

/* blinking cursor while the entry generates itself */
.fw-text.typing::after{
  content:"\258D";
  margin-left:1px;
  color:var(--gold);
  animation:fw-blink 0.85s step-end infinite;
}
@keyframes fw-blink{50%{opacity:0;}}

/* installed: the row is now a live pathway */
.fw-row-005.done{
  background:rgba(232,169,74,0.09);
  box-shadow:inset 0 0 22px -6px rgba(232,169,74,0.55);
  cursor:pointer;
}
.fw-row-005.done .fw-num,
.fw-row-005.done .fw-text{
  color:var(--gold);
  text-shadow:0 0 10px rgba(232,169,74,0.6);
}
.fw-row-005.done .fw-status[data-tone="ok"]{color:var(--gold);}
.fw-row-005.done .fw-pulse-fill{fill:var(--gold);opacity:0.9;}
.fw-row-005.done:hover{background:rgba(232,169,74,0.15);}

/* A real anchor laid over the finished row: correct Referer for the
   .htaccess check, middle-click and keyboard both work, and screen
   readers get a genuine link rather than a div pretending to be one. */
.fw-pathway{
  position:absolute;
  inset:0;
  z-index:2;
  text-indent:-9999px;
  overflow:hidden;
  white-space:nowrap;
}
.fw-pathway[hidden]{display:none;}

/* --- sidebar note once the pathway opens --- */
.marginalia .note.fw-note-live .note-label{color:var(--gold);}
.marginalia .note.fw-note-live{
  border-left:1px solid rgba(232,169,74,0.4);
  padding-left:12px;
  margin-left:-13px;
}

/* Shown only once RCP-05 has actually been installed on this browser.
   The per-visit progress resets on every load; this notice is the one
   thing that persists, so a repeat run reads as a replay rather than a
   first discovery. */
.fw-operating{
  margin:-0.4em 0 1.2em;
  padding-bottom:9px;
  border-bottom:1px solid rgba(70,224,166,0.2);
  font-family:'IBM Plex Mono', monospace;
  font-size:0.62rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  line-height:1.7;
  color:var(--teal);
  opacity:0.8;
}
.fw-operating[hidden]{display:none;}

@media (prefers-reduced-motion: reduce){
  .fw-text.typing::after{animation:none;}
  .fw-row,.fw-num,.fw-text,.fw-status,.fw-progress{transition:none;}
}

@media (max-width:620px){
  .fw-row{
    grid-template-columns:46px minmax(0,1fr);
    row-gap:5px;
    padding:9px 4px;
  }
  .fw-status{
    grid-column:1 / -1;
    text-align:right;
    font-size:0.56rem;
  }
  .fw-status-br{display:none;}   /* full row available; no break needed */
  .fw-operating{font-size:0.56rem;letter-spacing:0.07em;}
  .fw-progress{
    display:block;
    margin:6px 0 0;
  }
}
