:root{
  --bg:#0b0f14;
  --card:#121a24;
  --text:#e7eefc;
  --muted:#a9b7d0;
  --line:#223047;
}

*, *::before, *::after{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  font-family:-apple-system,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
}

/* links match UI */
a{ color:inherit; text-decoration:none; }
a.ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:transparent;
}

.top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:18px 16px;
  border-bottom:1px solid var(--line);
  flex-wrap:wrap;
}

.sub{ margin:4px 0 0; color:var(--muted); }
.stamp{ color:var(--muted); font-size:12px; }

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  max-width:100%;
}

.grid{
  display:grid;
  gap:14px;
  padding:14px;
  grid-template-columns:1fr;
}

@media (min-width: 900px){
  .grid{ grid-template-columns:1fr 1fr; }
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
}

.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

button, select, input{
  background:#1b2940;
  border:1px solid var(--line);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  max-width:100%;
  -webkit-appearance:none;
  appearance:none;
}

button{ cursor:pointer; }
button.ghost{ background:transparent; }

button:disabled,
select:disabled,
input:disabled{
  opacity:.55;
  cursor:not-allowed;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a.ghost:focus-visible{
  outline:2px solid var(--muted);
  outline-offset:2px;
}

input{ min-width:120px; }

.box{
  background:#0d141e;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  min-height:90px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
}

.hint{
  color:var(--muted);
  font-size:12px;
  margin:8px 0 0;
}

.kpis{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.kpi{
  flex:1;
  min-width:120px;
  background:#0d141e;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
}

.k{ color:var(--muted); font-size:12px; }
.v{ font-size:18px; margin-top:4px; }

.foot{
  padding:14px 16px;
  color:var(--muted);
  border-top:1px solid var(--line);
}

.noscript{
  padding:16px;
  color:#fff;
  background:#111;
  border:1px solid #333;
  border-radius:12px;
  margin:16px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field-label{
  font-size:12px;
  color:var(--muted);
}

.subcard{ margin-top:10px; }
.subcard-summary{
  cursor:pointer;
  color:var(--muted);
  font-size:12px;
}

#transcriptBox{ min-height:70px; }

/* header mini language control */
.mini-field{
  display:flex;
  align-items:center;
  gap:6px;
}

.mini-label{
  font-size:12px;
  color:var(--muted);
}
