/* ==========================================================================
   WIRELINE — styles
   Split out from index.html for a cleaner project structure (was a single
   1200-line HTML file with a giant inline <style> block).
   ========================================================================== */

/* =============================================================
   TOKENS
   Paper + graphite + a single signal-orange accent (patch-cable /
   status-LED color, not a "tech gradient" teal/violet).
   ============================================================= */
:root{
  --paper:        #FBFAF7;
  --panel:        #FFFFFF;
  --panel-sunk:   #F3F1EA;
  --line:         #DEDACE;
  --line-soft:    #EAE7DC;
  --ink:          #1B1B18;
  --ink-dim:      #63625A;
  --ink-mute:     #9C9A8E;
  --signal:       #C4501C;
  --signal-dim:   #E7C4AE;
  --signal-wash:  #FBEEE5;
  --ok:           #3C6E4F;
  --ok-wash:      #E6EFE7;
  --warn:         #8A6A1E;
  --warn-wash:    #F4EAD2;
  --danger:       #9C2E24;
  --danger-wash:  #F5E1DD;
  --r-sm:         3px;
  --r:            4px;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --display: 'Archivo Expanded', 'Archivo', sans-serif;
  --head: 'Archivo', sans-serif;
  --body: 'Source Sans 3', -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*{box-sizing:border-box; margin:0; padding:0;}
html{color-scheme: light;}
body{
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a{color: var(--signal); text-decoration:none;}
button{font-family: inherit; cursor:pointer;}
:focus-visible{outline: 2px solid var(--signal); outline-offset: 2px;}
@media (prefers-reduced-motion: reduce){
  *{animation-duration: 0.01ms !important; transition-duration: 0.01ms !important;}
}

/* =============================================================
   APP SHELL — persistent left SIDEBAR (identity + menu + live
   status + route diagram) alongside the main task column. On
   narrow screens the sidebar becomes a slide-in drawer opened by
   a slim top bar, instead of stacking everything vertically.
   ============================================================= */
.app-shell{
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px){
  .app-shell{ grid-template-columns: 1fr; }
}

.brand-mark{ width: 26px; height: 26px; flex-shrink:0; }
.brand-mark svg{ display:block; width:100%; height:100%; }

/* ---- mobile top bar: hidden on desktop, shows the hamburger ---- */
.topbar{
  display: none;
  position: sticky;
  top: 0;
  z-index: 60;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px){
  .topbar{ display: flex; grid-column: 1 / -1; }
}
.sidebar-toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--ink);
  flex-shrink: 0;
}
.sidebar-toggle svg{ width: 18px; height: 18px; }
.topbar-word{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.topbar-status{ margin-left: auto; }

.sidebar-backdrop{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27,27,24,0.32);
  z-index: 65;
}
body.sidebar-open .sidebar-backdrop{ display: block; }

/* ---- sidebar ---- */
.sidebar{
  border-right: 1px solid var(--line);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand{
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar-word{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* live status pill, sits under the brand on desktop */
.status-pill{
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  width: fit-content;
}

/* ---- sidebar nav menu: vertical, not horizontal tabs ---- */
.sidebar-menu{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-item{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--head);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: background .15s, color .15s, border-color .15s;
}
.menu-item svg{ width: 16px; height: 16px; flex-shrink: 0; opacity: 0.75; }
.menu-item:hover{ background: var(--panel-sunk); color: var(--ink); }
.menu-item.active{
  background: var(--panel-sunk);
  color: var(--ink);
  border-color: var(--line);
}
.menu-item.active svg{ opacity: 1; color: var(--signal); }

@media (max-width: 900px){
  .sidebar{
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: min(300px, 84vw);
    z-index: 70;
    background: var(--paper);
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
  }
  body.sidebar-open .sidebar{
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(27,27,24,0.12);
  }
  .sidebar-brand{ display: none; }
}

/* ---- route diagram: the signature element ----
   Two labeled nodes, A (you) and B (peer), joined by a line whose
   state communicates the literal connection lifecycle. This
   replaces the generic "oscilloscope card" with something that
   reads as a wiring diagram for the two ends of the transfer. */
.route{
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 16px 14px 14px;
}
.route-title{
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.route-diagram{
  position: relative;
  height: 108px;
}
.route-node{
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--panel-sunk);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-dim);
  z-index: 2;
  transition: border-color .3s, color .3s, background .3s;
}
.route-node.you{ top: 4px; left: 4px; }
.route-node.peer{ top: 4px; right: 4px; }
.route-node.live{
  border-color: var(--signal);
  color: var(--signal);
  background: var(--signal-wash);
}
.route-node-label{
  position:absolute;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  top: 54px;
}
.route-node.you ~ .route-node-label.you-l{ left: 0; }
.route-node-label.you-l{ left: 0; }
.route-node-label.peer-l{ right: 0; text-align:right; }
.route-wire{
  position: absolute;
  top: 27px; left: 46px; right: 46px;
  height: 26px;
}
.route-wire canvas{ display:block; width:100%; height:100%; }
.route-status-row{
  display:flex; justify-content: space-between; align-items:center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
}
.route-status{
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  display:flex; align-items:center; gap:7px;
}
.dot{
  width:6px; height:6px; border-radius:50%;
  background: var(--ink-mute);
  flex-shrink:0;
  position: relative;
}
.dot.live{ background: var(--signal); }
.dot.live::after{
  content:'';
  position:absolute; inset:-4px;
  border-radius:50%;
  border: 1px solid var(--signal);
  animation: pulse-ring 1.8s var(--ease) infinite;
}
.dot.warn{ background: var(--warn); }
.dot.err{ background: var(--danger); }
@keyframes pulse-ring{
  0%{ transform: scale(0.6); opacity: 0.9; }
  100%{ transform: scale(1.8); opacity: 0; }
}
.route-badge-mini{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
}
.route-badge-mini b{ color: var(--signal); font-weight: 700; }

/* ---- rail footer: trust facts as a spec sheet, not a card grid ---- */
.spec{
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spec-row{
  display:flex; justify-content: space-between; gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.spec-row:last-child{ border-bottom:none; padding-bottom:0; }
.spec-row span:first-child{ color: var(--ink-dim); }

/* =============================================================
   MAIN COLUMN
   ============================================================= */
.main{
  padding: 34px 40px 60px;
  min-width: 0;
}
@media (max-width: 900px){
  .main{ padding: 24px 20px 48px; }
}
@media (max-width: 480px){
  .main{ padding: 18px 14px 40px; }
}

/* ---- hero ---- */
.hero{
  max-width: 640px;
  margin-bottom: 34px;
}
.hero-eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--signal);
  margin-bottom: 10px;
}
.hero h1{
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin-bottom: 14px;
  color: var(--ink);
}
.hero p{
  color: var(--ink-dim);
  font-size: 15.5px;
  max-width: 52ch;
}

.view{ display:none; }
.view.active{ display:block; animation: fade-up 0.3s var(--ease); }
@keyframes fade-up{
  from{ opacity:0; transform: translateY(5px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ---- panel: flatter, quieter than a card — a labeled section
   rather than a floating tile ---- */
.panel{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px 26px;
  margin-bottom: 14px;
}
.panel-head{
  display:flex; align-items:baseline; justify-content:space-between;
  margin-bottom: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
.panel-head h2{
  font-family: var(--head);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-dim);
  font-weight: 700;
}
.panel-head .eyebrow-num{ color: var(--signal); margin-right:8px; }

/* ---- dropzone ---- */
.dropzone{
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 44px 20px;
  text-align:center;
  transition: border-color 0.2s, background 0.2s;
  cursor:pointer;
}
.dropzone:hover, .dropzone.drag{
  border-color: var(--signal);
  background: var(--signal-wash);
}
.dropzone svg{ width:32px; height:32px; color: var(--ink-mute); margin-bottom:14px; }
.dropzone.drag svg{ color: var(--signal); }
.dropzone-title{ font-family: var(--head); font-weight:600; margin-bottom:5px; font-size: 15px; }
.dropzone-sub{ font-size: 12.5px; color: var(--ink-mute); font-family: var(--mono); }
.dropzone input[type=file]{ display:none; }

/* ---- file list — a manifest, not a card list ---- */
.filelist{ margin-top: 16px; }
.file-row{
  display:flex; align-items:center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.file-row:first-child{ border-top: 1px solid var(--line-soft); }
.file-icon{
  width: 28px; height:28px; flex-shrink:0;
  border-radius: var(--r-sm);
  background: var(--panel-sunk);
  border: 1px solid var(--line-soft);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--signal);
  font-weight:700;
  text-transform: uppercase;
}
.file-meta{ flex:1; min-width:0; }
.file-name{ font-size: 13.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.file-size{ font-size: 11px; color: var(--ink-mute); font-family: var(--mono); }
.file-remove{
  background:none; border:none; color: var(--ink-mute);
  font-size: 18px; line-height:1; padding: 4px 6px;
  border-radius: var(--r-sm);
}
.file-remove:hover{ color: var(--danger); background: var(--danger-wash); }

/* ---- buttons ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--head);
  font-weight: 600;
  font-size: 13.5px;
  transition: transform 0.15s var(--ease), border-color 0.15s, background 0.15s, color .15s;
  width: 100%;
}
.btn:hover{ border-color: var(--ink-mute); }
.btn:active{ transform: scale(0.98); }
.btn:disabled{ opacity: 0.4; cursor:not-allowed; }
.btn-primary{
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}
.btn-primary:hover{ background: var(--signal); border-color: var(--signal); }
.btn-danger{ color: var(--danger); }
.btn-danger:hover{ border-color: var(--danger); background: var(--danger-wash); }
.btn-ghost{ background: transparent; }
.btn-row{ display:flex; gap:10px; }

/* ---- share methods ---- */
.share-methods{
  display:grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
@media(min-width: 640px){
  .share-methods{ grid-template-columns: 1.3fr 1fr; }
}
.method{
  background: var(--panel-sunk);
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}
@media(min-width: 640px){
  .method{ border-bottom:none; border-right: 1px solid var(--line-soft); }
  .method:last-child{ border-right:none; }
}
.method:last-child{ border-bottom:none; }
.method-label{
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-bottom: 10px;
  display:flex; align-items:center; gap:6px;
}
.link-row{
  display:flex; gap:8px;
}
.link-input{
  flex:1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 12px;
  min-width: 0;
}
.copy-btn{
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--head);
  font-size: 12px;
  font-weight:600;
  flex-shrink:0;
}
.copy-btn:hover{ border-color: var(--signal); color: var(--signal); }
.copy-btn.copied{ border-color: var(--ok); color: var(--ok); }

.code-display{
  display:flex; gap:6px; justify-content:center;
  margin: 6px 0 4px;
}
.code-digit{
  width: 36px; height: 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.qr-wrap{
  display:flex; align-items:center; justify-content:center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  width: fit-content;
  margin: 0 auto;
}

/* code input for receive */
.code-input-row{
  display:flex; gap:6px; justify-content:center;
  margin: 4px 0 18px;
}
.code-input-digit{
  width: 42px; height: 50px;
  background: var(--panel-sunk);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  text-align:center;
  font-family: var(--mono);
  font-size: 21px;
  font-weight:700;
  color: var(--ink);
  transition: border-color 0.15s;
}
.code-input-digit:focus{ border-color: var(--signal); background: var(--panel); }

/* ---- verification fingerprint ---- */
.fingerprint{
  display:flex; align-items:center; gap: 14px;
  background: var(--panel-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-top: 14px;
}
.fingerprint-icon{ flex-shrink:0; color: var(--signal); }
.fingerprint-body{ flex:1; min-width:0; }
.fingerprint-label{ font-size: 10.5px; color: var(--ink-mute); text-transform:uppercase; letter-spacing:0.06em; font-family: var(--mono); margin-bottom:4px; }
.fingerprint-code{ font-family: var(--mono); font-size: 16px; font-weight:700; letter-spacing: 0.08em; color: var(--ink); word-break: break-all; }

/* ---- progress ---- */
.progress-block{ margin-top: 6px; }
.progress-top{
  display:flex; justify-content:space-between; align-items:baseline;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.progress-pct{ font-size: 22px; font-weight:700; color: var(--ink); font-family: var(--mono); }
.progress-stats{ color: var(--ink-mute); text-align:right; }
.progress-track{
  height: 4px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow:hidden;
  position: relative;
}
.progress-fill{
  height:100%;
  background: var(--signal);
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s var(--ease);
}
.speed-graph{
  height: 32px;
  margin-top: 12px;
  border-radius: var(--r-sm);
  overflow:hidden;
  background: var(--panel-sunk);
}
.speed-graph canvas{ width:100%; height:100%; display:block; }

.transfer-file-row{
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.transfer-file-row .file-name{ margin-bottom:6px; }

/* ---- relay/direct badge ---- */
.route-badge{
  display:inline-flex; align-items:center; gap:6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight:600;
  border: 1px solid var(--line);
  background: var(--panel-sunk);
}
.route-badge.direct{ color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.route-badge.relay{ color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.route-badge .dot{ width:6px; height:6px; }

/* ---- footer note (bottom of main, plain text, not a card) ---- */
.foot-note{
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-mute);
  font-size: 12px;
  font-family: var(--mono);
}

/* ---- expiry note ---- */
.expiry-note{
  display:flex; align-items:center; gap:8px;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 14px;
  font-family: var(--mono);
}
.expiry-note svg{ width:14px; height:14px; flex-shrink:0; }

/* ---- toast ---- */
.toast{
  position: fixed;
  bottom: 20px; left:50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--mono);
  opacity:0;
  pointer-events:none;
  transition: all 0.3s var(--ease);
  z-index: 100;
  max-width: 90vw;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }

/* ---- shared small helper ---- */
.panel-desc{ color: var(--ink-dim); font-size: 13px; margin-bottom: 16px; }

/* ---- text channel: host/join mode switch ---- */
.text-mode-switch{
  display: flex; gap: 6px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--panel-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
}
.mode-btn{
  flex: 1;
  padding: 9px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--head);
  font-weight: 600;
  font-size: 13px;
  transition: background .15s, color .15s, border-color .15s;
}
.mode-btn:hover{ color: var(--ink); }
.mode-btn.active{
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---- text channel: connection toolbar ---- */
.text-toolbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  margin-bottom: 16px;
}
.text-toolbar-left{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.btn-compact{ width: auto; padding: 9px 18px; }

/* ---- text channel: two-column workspace ----
   Live pad gets a clear majority of the width; the side column is
   pinned to a comfortable reading width instead of stretching. */
.text-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px){
  .text-grid{ grid-template-columns: 1fr; }
}
.text-panel-live{ display: flex; flex-direction: column; height: 100%; }
.text-panel-side{ display: flex; flex-direction: column; gap: 16px; }

.live-pad-meta{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink-mute);
}

/* ---- text channel: live pad + compose pad ---- */
.live-pad, .compose-pad{
  width: 100%;
  resize: vertical;
  background: var(--panel-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.live-pad{ min-height: 380px; flex: 1; }
.compose-pad{ min-height: 150px; }
.live-pad:focus, .compose-pad:focus{
  border-color: var(--signal);
  background: var(--panel);
}
.live-pad-foot, .compose-foot{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
}

/* ---- text channel: history feed, chat-style with sender avatars ---- */
.text-feed{
  max-height: 320px;
  overflow-y: auto;
  margin: -4px -4px -4px 0;
  padding-right: 4px;
}
.text-feed-item{
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.text-feed-item:first-child{ padding-top: 2px; }
.text-feed-avatar{
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--panel-sunk);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink-dim);
}
.text-feed-item.mine .text-feed-avatar{
  border-color: var(--signal);
  color: var(--signal);
  background: var(--signal-wash);
}
.text-feed-main{ flex: 1; min-width: 0; }
.text-feed-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.text-feed-head b{ color: var(--ink-dim); }
.text-feed-body{
  font-size: 13px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow-y: auto;
  background: var(--panel-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.text-feed-copy{
  padding: 4px 10px;
  font-size: 11px;
  flex-shrink: 0;
}

/* ---- empty/idle state ---- */
.idle-state{
  text-align:center;
  padding: 34px 16px;
  color: var(--ink-mute);
}
.idle-state svg{ width:26px; height:26px; margin-bottom: 10px; opacity:0.6; }
.idle-state p{ font-size: 13px; font-family: var(--mono); }

/* responsive */
@media (max-width: 480px){
  .panel{ padding: 18px; }
  .code-input-digit{ width: 36px; height: 44px; font-size:17px; }
  .code-display{ flex-wrap: wrap; }
}
