body {
  max-width: 960px;
  margin: 0 auto;
  padding: 1em;
  font-family: Georgia, "Times New Roman", serif;
  color: #111;
  background: #fff;
  line-height: 1.4;
  font-variant-numeric: lining-nums;   /* "q0" y no "qo" con Georgia */
}

header h1 { margin-bottom: 0; }
header p { margin-top: .2em; color: #444; }
h2 { border-bottom: 1px solid #999; padding-bottom: .2em; margin-top: 1.6em; }

fieldset { margin: 0 0 1em; border: 1px solid #999; }
fieldset label { margin-right: 1.2em; }
textarea, input.palabra, code, .cinta, .di, table.delta td {
  font-family: Consolas, "Courier New", monospace;
}
textarea { width: 100%; box-sizing: border-box; font-size: 14px; }
input.palabra { width: 14em; }
input[type=number] { width: 6em; }

.nota { color: #555; font-size: .9em; }
.error { border: 1px solid #b00; color: #b00; padding: .5em; }
.avisos { color: #7a5a00; font-size: .9em; }

table { border-collapse: collapse; margin: .5em 0; }
th, td { border: 1px solid #999; padding: .25em .6em; text-align: left; }
th { background: #eee; }
table.definicion th { width: 2.5em; }
table.delta td, table.delta th { text-align: center; }
td.vacia { color: #aaa; }
td.actual { background: #ffe58a; font-weight: bold; }

.resultado { font-weight: bold; }
.resultado.aceptada { color: #146c2e; }
.resultado.rechazada { color: #b00; }
.resultado.limite { color: #7a5a00; }

/* Visor de la cinta */
.controles { margin: .5em 0; }
#barra { width: 100%; }
.cinta {
  display: flex;
  overflow-x: auto;
  padding: .3em 0 .6em;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
.casilla { flex: 0 0 2.4em; text-align: center; }
.casilla .marca { height: 1.5em; font-size: .85em; white-space: nowrap; color: #333; }
.casilla .simbolo {
  height: 2.2em;
  line-height: 2.2em;
  border: 1px solid #333;
  margin-left: -1px;
  font-size: 1.2em;
}
.casilla .posicion { font-size: .7em; color: #888; }
.casilla.cabezal .simbolo { background: #ffe58a; border-width: 2px; }
.casilla.cabezal .marca { font-weight: bold; color: #000; }
.blanco { color: #aaa; }
.estado-actual { font-family: Consolas, "Courier New", monospace; }

/* Traza */
table.traza { width: 100%; font-size: .95em; }
table.traza tr[data-paso] { cursor: pointer; }
table.traza tr.actual td { background: #ffe58a; }
.di .estado { color: #003c9e; margin: 0 .15em; }
.di span { display: inline-block; width: 1.1em; text-align: center; }

/* Carga del archivo */
.nota.cargado { color: #146c2e; }
.nota.error-texto { color: #b00; }

/* Diagrama de estados (colores de JFLAP) */
svg.diagrama { display: block; width: 100%; height: auto; border: 1px solid #ccc; background: #fff; touch-action: none; }
svg.diagrama .estado { cursor: grab; }
svg.diagrama .circulo { fill: #fbf38c; stroke: #333; stroke-width: 1.2; }
svg.diagrama .final { fill: none; stroke: #333; stroke-width: 1.2; }
svg.diagrama .inicial { fill: #fff; stroke: #333; stroke-width: 1.2; }
svg.diagrama .estado text { font: 14px Georgia, serif; font-variant-numeric: lining-nums; pointer-events: none; }
svg.diagrama .estado.actual .circulo { fill: #f4a940; stroke-width: 2; }
svg.diagrama .arista { fill: none; stroke: #333; stroke-width: 1.1; }
svg.diagrama .arista.activa { stroke: #d2691e; stroke-width: 2.2; }
svg.diagrama .flecha { fill: #333; }
svg.diagrama .flecha.activa { fill: #d2691e; }
svg.diagrama .etiqueta { font: 12px Consolas, "Courier New", monospace; fill: #222;
  paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
svg.diagrama .etiqueta .activa { fill: #c0560f; font-weight: bold; }

footer { margin-top: 3em; color: #888; font-size: .85em; border-top: 1px solid #ccc; padding-top: .5em; }
